結果

問題 No.3093 Please GCD
ユーザー nasutarou1341nasutarou1341
提出日時 2022-04-01 22:15:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 361 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 82,520 KB
実行使用メモリ 87,304 KB
平均クエリ数 505.00
最終ジャッジ日時 2024-04-30 14:22:23
合計ジャッジ時間 6,913 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
69,684 KB
testcase_01 AC 65 ms
70,832 KB
testcase_02 AC 74 ms
76,872 KB
testcase_03 AC 136 ms
85,088 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 128 ms
86,880 KB
testcase_07 AC 140 ms
86,264 KB
testcase_08 WA -
testcase_09 AC 129 ms
85,364 KB
testcase_10 AC 62 ms
70,744 KB
testcase_11 AC 97 ms
79,772 KB
testcase_12 AC 126 ms
85,636 KB
testcase_13 AC 125 ms
86,896 KB
testcase_14 AC 126 ms
84,856 KB
testcase_15 AC 75 ms
76,224 KB
testcase_16 AC 125 ms
85,916 KB
testcase_17 AC 132 ms
85,656 KB
testcase_18 AC 128 ms
85,432 KB
testcase_19 WA -
testcase_20 AC 139 ms
85,724 KB
testcase_21 AC 153 ms
85,272 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 131 ms
85,480 KB
testcase_26 AC 133 ms
85,080 KB
testcase_27 AC 130 ms
86,140 KB
testcase_28 WA -
testcase_29 AC 122 ms
85,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
M = N + 1
DP = [1] * M

DP[0] = 0
DP[1] = 0

L = []
for i in range(2, M):
  if DP[i] == 1:
    for j in range(i + i, M, i):
      DP[j] = 0
    k = i
    while k < M:
      k *= i
    k //= i
    L.append(k)

ans = 1

cnt = 0
for n in L:
  print("?", n, flush = True)
  ans *= int(input())
  cnt += 1
  if cnt == 600:
    break

print("!", ans)
0