結果

問題 No.3093 Please GCD
ユーザー googol_S0googol_S0
提出日時 2022-04-01 22:52:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 551 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 82,412 KB
実行使用メモリ 94,948 KB
平均クエリ数 502.23
最終ジャッジ日時 2024-04-30 15:18:22
合計ジャッジ時間 18,820 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
72,188 KB
testcase_01 AC 69 ms
71,676 KB
testcase_02 AC 92 ms
80,044 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 562 ms
92,180 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 173 ms
89,488 KB
testcase_10 AC 66 ms
72,036 KB
testcase_11 AC 138 ms
83,624 KB
testcase_12 AC 547 ms
91,756 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 88 ms
79,120 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 626 ms
94,644 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 417 ms
94,208 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#HELP

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
from random import *
Q=[]
for i in range(len(P)):
  Q.insert(randrange(0,len(Q)+1),P[i])
P=Q[:]
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