結果

問題 No.305 鍵(2)
ユーザー takakintakakin
提出日時 2020-05-24 20:33:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 571 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 10,892 KB
実行使用メモリ 24,968 KB
平均クエリ数 55.15
最終ジャッジ日時 2023-09-24 02:38:15
合計ジャッジ時間 1,681 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
24,776 KB
testcase_01 AC 47 ms
24,716 KB
testcase_02 AC 43 ms
24,320 KB
testcase_03 AC 43 ms
24,776 KB
testcase_04 AC 44 ms
24,888 KB
testcase_05 AC 46 ms
24,844 KB
testcase_06 AC 43 ms
24,752 KB
testcase_07 AC 44 ms
24,968 KB
testcase_08 AC 47 ms
24,676 KB
testcase_09 AC 44 ms
24,700 KB
testcase_10 AC 44 ms
24,404 KB
testcase_11 AC 44 ms
24,480 KB
testcase_12 AC 45 ms
24,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
import random
import sys
def ran(x):
  ret=""
  for _ in range(x):
    ret+=str(random.randrange(10))
  return ret

while True:
  cur=ran(10)
  print(cur,flush=True)
  ct,res=map(str,input().split())
  if ct=="10":
    sys.exit
  elif ct=="0":
    zero=cur
    break
  else:
    continue

ans=""
for i in range(10):
  for j in range(10):
    print(zero[:i]+str(j)+zero[i+1:],flush=True)
    ct,res=map(str,input().split())
    if ct=="0":
      continue
    else:
      ans+=str(j)
      break
print(ans,flush=True)
0