| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 132654 | 胡皓宇 | 19灯的编号 | Python3 | Wrong Answer | 53 MS | 3772 KB | 370 | 2025-10-12 09:26:50 |
n,m = input().split() n,m = int(n),int(m) #n灯 a = [0] * n+[0] #0--off -1---on 第一个人的操作完成 for i in range(2,m+1): #i是人 for j in range(1,n+1): if j % i == 0: if a[j] == 0: a[j] = 1 else: a[j] = 0 for y in range(1,n+1): if a[y] == 0: print(y,end=",")
------Input------
77 40
------Answer-----
1,4,9,16,25,36,41,42,43,44,45,46,47,48,50,51,52,53,54,55,56,57,58,59,60,61,62,63,65,66,67,68,69,70,71,72,73,74,75,76,77
------Your output-----
1,4,9,16,25,36,41,42,43,44,45,46,47,48,50,51,52,53,54,55,56,57,58,59,60,61,62,63,65,66,67,68,69,70,71,72,73,74,75,76,77,