【ACM-ICPC 2018 南京赛区网络预赛 A】An Olympian Math Problem

【链接】 我是链接,点我呀:)
【题意】

在这里输入题意

【题解】

估计试几个就会发现答案总是n-1吧。 队友给的证明 ![](https://images2018.cnblogs.com/blog/1251265/201809/1251265-20180902193945228-992372497.jpg)

【代码】

#include <bits/stdc++.h>
#define LL long long
#define rep1(i,a,b) for (int i = a;i <= b;i++)
#define rep2(i,a,b) for (int i = a;i >= b;i--)
#define all(x) x.begin(),x.end()
#define pb push_back
#define lson l,mid,rt<<1
#define ri(x) scanf("%d",&x)
#define rl(x) scanf("%lld",&x)
#define rs(x) scanf("%s",x)
#define rson mid+1,r,rt<<1|1
using namespace std;

const double pi = acos(-1);
const int dx[4] = {0,0,1,-1};
const int dy[4] = {1,-1,0,0};

LL n;

int main(){
	#ifdef LOCAL_DEFINE
	    freopen("rush_in.txt", "r", stdin);
	#endif
	ios::sync_with_stdio(0),cin.tie(0);
	int T;
	cin >> T;
    while (T--){
        cin >> n;
        cout<<n-1<<endl;
    }
	return 0;
}
原文地址:https://www.cnblogs.com/AWCXV/p/9574885.html