uva 151 - Power Crisis
来源:互联网 发布:ubuntu重启图形界面 编辑:程序博客网 时间:2024/06/05 05:22
约瑟夫环问题。
把第一个去掉,应该找的13就变成了11。
#include<iostream>using namespace std;int main(){ int n; while(cin>>n&&n) { int i,j,x; for(i=1;i<n-1;i++) { x=0; for(j=1;j<n;j++) x=(x+i)%j; if(x==11)break; } cout<<i<<endl; } return 0;}
- Uva 151 - Power Crisis
- uva 151 - Power Crisis
- UVA 151 - Power Crisis
- UVa 151 - Power Crisis
- UVa 151 - Power Crisis
- UVa 151 - Power Crisis
- UVA, 151 Power Crisis
- Power Crisis
- Power Crisis
- Power Crisis
- Uva-12186-Another Crisis
- UVA 12186 Another Crisis
- UVA - 12186 Another Crisis
- UVA-12186 Another Crisis
- uva 12186 Another Crisis
- UVA 12186 Another Crisis
- UVA 12186 Another Crisis
- Another Crisis UVA
- springMVC各个包下的作用
- Android.mk编译APK范例
- VC++用ADO连接Oracle数据库
- C#(Assembly.Load方法介绍)
- 两台不同的数据库中的表的操作方法(oracle和sql+server的比较)
- uva 151 - Power Crisis
- Java线程:线程的调度-让步
- ADO/ADO.NET
- Linux进程间通信
- Android Bluetooth Address
- python数组的使用
- .net
- linux 大项目的 makefile 的例子
- 算法:字符串匹配、BF/KMP/近似匹配