BestCoder Round #51 (div.2) 1001 Zball in Tina Town
来源:互联网 发布:软件操作手册 编辑:程序博客网 时间:2024/06/05 15:24
#include <iostream>#include <cstring>#include <cstdio>#include <cstdlib>#include <algorithm>#include <cmath>#include <queue>#include <stack>#define LL long long#define INF 0x3f3f3f3fusing namespace std;int n;bool Prim(int n){ for(int i=2;i*i<=n;i++) { if(n%i == 0) return false; } return true;}int main(){ int T; scanf("%d",&T); while(T--) { int t; scanf("%d",&n); if(n == 4) { t = 2; } else if(Prim(n)) { t = n - 1; } else t = 0; cout<<t<<endl; } return 0;}
0 0
- BestCoder Round #51 (div.2) 1001 Zball in Tina Town
- BestCoder Round #51 (div.2) Zball in Tina Town
- BestCoder Round #51 (div.2) Zball in Tina Town
- Zball in Tina Town-----(BestCoder Round #51 (div.2))
- BestCoder Round #51 (div.2) & HDOJ5391 Zball in Tina Town(数论)
- HDU 5391 Zball in Tina Town(数论——威尔逊定理)——BestCoder Round #51(div.2)
- B、Infoplane in Tina Town-----(BestCoder Round #51 (div.2) )
- Zball in Tina Town
- Zball in Tina Town
- HDU5391-Zball in Tina Town
- hdu5391 Zball in Tina Town
- Zball in Tina Town HDU
- hdu 5391 Zball in Tina Town
- hdu 5391 Zball in Tina Town (数学)
- hdu 5391 Zball in Tina Town
- hdu 5391 Zball in Tina Town
- HDU-5391 Zball in Tina Town
- HDU 5391-Zball in Tina Town(数论)
- hdoj1950Bridging signals(最长上升子序列)
- 《數據結構與算法分析:C語言描述》習題2.13c代碼及自己的想法
- 项视图类的自定义委托之文字省略
- 关于Android长按出现复制粘贴栏在顶部占位问题解决方法
- SSH页面懒加载异常处理方法
- BestCoder Round #51 (div.2) 1001 Zball in Tina Town
- UIView的类别实现之设置frame
- hadoop系列:zookeeper(3)——zookeeper核心原理(事件)
- HDU ACM 1000 A+B Problem
- IOS--UI--XML 解析
- sublime 配置自动补全和跳转
- Joda
- hdu 3255 Farming(线段树求体积并)
- 黑马程序员----集合(Collection)