結果

問題 No.305 鍵(2)
ユーザー pluto77pluto77
提出日時 2016-11-02 10:02:53
言語 Python2
(2.7.18)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 425 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 6,616 KB
実行使用メモリ 24,228 KB
平均クエリ数 44.08
最終ジャッジ日時 2023-09-24 00:40:46
合計ジャッジ時間 1,340 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
23,796 KB
testcase_01 AC 31 ms
23,604 KB
testcase_02 AC 28 ms
23,748 KB
testcase_03 AC 28 ms
23,964 KB
testcase_04 AC 29 ms
23,592 KB
testcase_05 AC 31 ms
23,856 KB
testcase_06 AC 27 ms
23,352 KB
testcase_07 AC 29 ms
23,508 KB
testcase_08 AC 29 ms
24,228 KB
testcase_09 AC 30 ms
24,024 KB
testcase_10 AC 31 ms
23,316 KB
testcase_11 AC 30 ms
23,352 KB
testcase_12 AC 29 ms
23,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_305
import sys

s='0000000000'
print s
sys.stdout.flush()
num,stat=raw_input().split()
if stat=='unlocked':
 sys,exit()
for i in xrange(10):
 for j in xrange(10):
  if s[i]==str(j):
   continue
  print s[:i]+str(j)+s[i+1:]
  sys.stdout.flush()
  num2,stat=raw_input().split()
  if stat=='unlocked':
   sys.exit()
  if int(num)<int(num2):
   s=s[:i]+str(j)+s[i+1:]
   num=num2
   break
  if int(num)>int(num2):
   break
0