POJ-3372(数论,完全剩余系)(Candy Distribution)
来源:互联网 发布:近几年双十一数据统计 编辑:程序博客网 时间:2024/04/30 12:30
【题目描述】
N个小孩围成一个圈,老师 顺时针隔 0, 1, 2, 3,。。。个小孩发糖,问每个小孩是否都能领到糖。
【解题思路】
解法很简单 当N是2^K时输出YES,否则输出NO。
int main(){int n;while (scanf("%d", &n) == 1) {if (n & (n - 1)) printf("NO\n");else printf("YES\n");}return 0;}
- POJ-3372(数论,完全剩余系)(Candy Distribution)
- poj 3372 Candy Distribution(完全剩余系)
- POJ 3372 Candy Distribution 完全剩余系/奇偶性
- POJ 3372 Candy Distribution(数论)
- poj 3372 Candy Distribution 数论
- POJ 3372 Candy Distribution
- poj 3372 Candy Distribution
- Poj 3372 Candy Distribution
- Poj 3372 Candy Distribution
- POJ 3372 Candy Distribution
- POJ - 3372 Candy Distribution
- poj 3372(完全剩余系/奇偶性)
- day4 POJ 3372 Candy Distribution
- POJ 3372 Candy Distribution G++
- poj 3372 完全剩余系
- POJ 3372 —— Candy Distribution
- (Relax 数论 1.18)POJ 3372 Candy Distribution(找规律,判断一个数看其是否是2的多少次幂)
- 3372 Candy Distribution
- 如何重置数据库Suppect(置疑)状态
- smarty安装及初级使用
- 1.3.1 日志文件里到底有什么
- php中获取文件名,文件扩展名以及所在目录的方法
- 快排算法
- POJ-3372(数论,完全剩余系)(Candy Distribution)
- 用sql语句dbcc log 查看SQL Server 数据库的事务日志
- (总结)JAVA课程设计报告:记事本的设计与实现
- 用PHP的ob_start();控制您的浏览器cache!
- xmanager 4 连接SuSE linux 11
- ob_get_contents() 函数的用法
- The database cluster initialisation failed
- php的几个配置文件函数
- PHP中str_replace函数使用数组