ZOJ-1350
2013-12-16 11:17
239 查看
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count = sc.nextInt(); for (int i = 0; i < count; i++) { int n = sc.nextInt(); boolean[] array = new boolean ; for (int j = 1; j <= n; j++) { for (int k = 0; k < array.length; k++) { if ((k + 1) % j == 0) array[k] = !array[k]; } } int total = 0; for (int j = 0; j < array.length; j++) { if (array[j]) total++; } System.out.println(total); } } }
相关文章推荐
- zoj 1350 The Drunk Jailer
- ZOJ 1350 The Drunk Jailer
- zoj_1350 The Drunk Jailer 思路总结
- ZOJ Problem Set–1350 The Drunk Jailer
- ZOJ 1350水题不解释
- ZOJ Problem Set - 1350 The Drunk Jailer ac代码 memset
- zoj 1350
- POJ1218 HDU1337 ZOJ1350 UVALive2557 THE DRUNK JAILER【模拟】
- Python--ZOJ1350
- zoj 1350 The Drunk Jailer
- zoj1350
- ZOJ 1350 监狱守长
- HDU 1337 || ZOJ 1350 The Drunk Jailer
- zoj 2042 Divisibility
- ZOJ-2486
- ZOJ 2315 New Year Bonus Grant
- zoj3953 贪心 training 3
- zoj 1500 Pre-Post-erous!
- ZOJ-2514
- ZOJ 3578