牛客算法周周练10 A
论如何出一道水题
https://ac.nowcoder.com/acm/contest/5986/A
签到题。
要使 只要让
互素即可。又要让
最大,所以只需要让
即可,但需要注意一点,当
时,
是可以相等的。所以
=1+1=2
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n;
int main(){
cin>>n;
if(n==1){
cout<<2;
return 0;
}
cout<<n+n-1;
return 0;
} 
