给你一个数,可以用和它互质的数减去它,问最后最小得到多少。
一开始想的是n和n-1是互质的,然后wa。反应过来,2要特殊考虑一下。
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
int v;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
//freopen("data.in","r",stdin);
//freopen("data.out","w",stdout);
cin>>v;
if(v==2) cout<<2;
else cout<<1;
return 0;
}