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

【题意】

在这里输入题意

【题解】

估计试几个就会发现答案总是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;
}

【ACM-ICPC 2018 南京赛区网络预赛 A】An Olympian Math Problem的更多相关文章

  1. ACM-ICPC 2018 南京赛区网络预赛(12/12)

    ACM-ICPC 2018 南京赛区网络预赛 A. An Olympian Math Problem 计算\(\sum_{i=1}^{n-1}i\cdot i!(MOD\ n)\) \(\sum_{i ...

  2. ACM-ICPC 2018 南京赛区网络预赛 J.sum

    A square-free integer is an integer which is indivisible by any square number except 11. For example ...

  3. ACM-ICPC 2018 南京赛区网络预赛 E题

    ACM-ICPC 2018 南京赛区网络预赛 E题 题目链接: https://nanti.jisuanke.com/t/30994 Dlsj is competing in a contest wi ...

  4. ACM-ICPC 2018 南京赛区网络预赛B

    题目链接:https://nanti.jisuanke.com/t/30991 Feeling hungry, a cute hamster decides to order some take-aw ...

  5. 计蒜客 30999.Sum-筛无平方因数的数 (ACM-ICPC 2018 南京赛区网络预赛 J)

    J. Sum 26.87% 1000ms 512000K   A square-free integer is an integer which is indivisible by any squar ...

  6. 计蒜客 30996.Lpl and Energy-saving Lamps-线段树(区间满足条件最靠左的值) (ACM-ICPC 2018 南京赛区网络预赛 G)

    G. Lpl and Energy-saving Lamps 42.07% 1000ms 65536K   During tea-drinking, princess, amongst other t ...

  7. 计蒜客 30990.An Olympian Math Problem-数学公式题 (ACM-ICPC 2018 南京赛区网络预赛 A)

    A. An Olympian Math Problem 54.28% 1000ms 65536K   Alice, a student of grade 66, is thinking about a ...

  8. ACM-ICPC 2018 南京赛区网络预赛 B. The writing on the wall

    题目链接:https://nanti.jisuanke.com/t/30991 2000ms 262144K   Feeling hungry, a cute hamster decides to o ...

  9. ACM-ICPC 2018 南京赛区网络预赛

    轻轻松松也能拿到区域赛名额,CCPC真的好难 An Olympian Math Problem 问答 只看题面 54.76% 1000ms 65536K   Alice, a student of g ...

  10. ACM-ICPC 2018 南京赛区网络预赛 L. Magical Girl Haze

    262144K   There are NN cities in the country, and MM directional roads from uu to v(1\le u, v\le n)v ...

随机推荐

  1. 一、Redis 基础命令---总括

    1.redis命令不区分大写和小写.可是KEY区分大写和小写. 2.redis-cli -h 127.0.0.1 -p 6379 依据IP/PORT链接服务端 3.redis-server --por ...

  2. Chrome改动浏览器User Agent

    对浏览器快捷方式右键->改动目标项为 C:\Users\LJ\AppData\Local\Google\Chrome\Application\chrome.exe --user-agent=&q ...

  3. 三期_day06_登录和找回password

    登录思路:   前台发送一个请求,然后通过spring的自己主动注參注入username和password,将password加密后与数据库中查找的做比較.返回是否通过. 这里还使用了EasyUI的校 ...

  4. UVa 572 - Oil Deposits (简单dfs)

    Description GeoSurvComp地质调查公司负责探測地下石油储藏. GeoSurvComp如今在一块矩形区域探測石油.并把这个大区域分成了非常多小块.他们通过专业设备.来分析每一个小块中 ...

  5. luogu3953 逛公园

    正解:SPFA+DP 将POJ3463中maxDist(Target)由minDist(Target)+1改为minDist(Target+K)即可.判断0环,需要对每个节点建立下标为maxDist- ...

  6. [SCOI 2010] 股票交易

    [题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=1855 [算法] 单调队列优化动态规划 [代码] #include<bits/s ...

  7. Intellij IDEA社区版打包Maven项目成war包,并部署到tomcat上

    转自:https://blog.csdn.net/yums467/article/details/51660683 需求分析 我们利用 Intellij idea社区版IDE开发了一个maven的sp ...

  8. day63-webservice 05.发布接口实现类的webservice

    package com.rl.cxf.client; import com.rl.inter.HI; import com.rl.inter.HIService; public class HiInt ...

  9. ROS-TF-广播

    前言:将海龟的坐标系变换广播到TF. URDF文件的描述是在相对坐标上进行的,运动起来就需要考虑机器人各个连杆的相对位置关系.TF的诞生就是为了自动管理这些相对关系下的坐标变换的,而我们需要做的就是给 ...

  10. LeetCode Weekly Contest 18B

    1. 496. Next Greater Element I 暴力的话,复杂度也就1000 * 1000 = 1e6, 在1s的时限内完全可以. 当然,有许多优化方法,利用stack维护递减序列的方法 ...