結果

問題 No.3093 Please GCD
ユーザー googol_S0googol_S0
提出日時 2022-04-01 22:20:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 448 bytes
コンパイル時間 249 ms
コンパイル使用メモリ 82,580 KB
実行使用メモリ 91,248 KB
平均クエリ数 502.13
最終ジャッジ日時 2024-04-30 14:27:51
合計ジャッジ時間 7,019 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
69,244 KB
testcase_01 AC 64 ms
69,700 KB
testcase_02 AC 78 ms
77,644 KB
testcase_03 AC 142 ms
85,464 KB
testcase_04 AC 134 ms
86,000 KB
testcase_05 WA -
testcase_06 AC 134 ms
87,116 KB
testcase_07 WA -
testcase_08 AC 143 ms
86,040 KB
testcase_09 AC 133 ms
85,840 KB
testcase_10 AC 59 ms
68,872 KB
testcase_11 AC 109 ms
85,740 KB
testcase_12 AC 130 ms
85,392 KB
testcase_13 AC 141 ms
86,304 KB
testcase_14 AC 219 ms
86,868 KB
testcase_15 AC 76 ms
77,340 KB
testcase_16 WA -
testcase_17 AC 132 ms
87,664 KB
testcase_18 AC 132 ms
85,996 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 223 ms
85,828 KB
testcase_22 AC 142 ms
85,532 KB
testcase_23 AC 143 ms
86,796 KB
testcase_24 AC 136 ms
86,668 KB
testcase_25 AC 197 ms
91,248 KB
testcase_26 AC 139 ms
86,500 KB
testcase_27 WA -
testcase_28 AC 134 ms
87,324 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

P=[]
N=int(input())
F=[0]*(N+1)
for i in range(2,N+1):
  if F[i]:
    continue
  P.append(i)
  for j in range(i,N+1,i):
    F[j]=1
M=5
i=0
A=[]
C=0
while i<len(P) and C<=595:
  v=1
  while i<len(P) and v*P[i]<=N:
    v*=P[i]
    i+=1
  print('?',v)
  C+=1
  S=int(input())
  for j in range(len(P)):
    if S%P[j]==0:
      A.append(P[j])
Z=1
for i in range(len(A)):
  v=1
  while v*A[i]<=N:
    v*=A[i]
  print('?',v)
  Z*=int(input())
print('!',Z)
0