zoukankan      html  css  js  c++  java
  • 【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;
    }
    
  • 相关阅读:
    NYOJ458
    NYOJ67
    NYOJ105
    NYOJ1071
    NYOJ463
    C语言练字用小软件 — Practise_Calligraphy_1.0(ANSI)
    NYOJ276
    NYOJ455
    NYOJ74
    Jzoj4458 密钥破解——Pollard-rho
  • 原文地址:https://www.cnblogs.com/AWCXV/p/9574885.html
Copyright © 2011-2022 走看看