結果

問題 No.305 鍵(2)
コンテスト
ユーザー yuki2006
提出日時 2015-11-27 19:13:55
言語 PyPy2
(7.3.20)
コンパイル:
pypy2 -m py_compile _filename_
実行:
/usr/bin/pypy2 Main.pyc
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 385 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,152 ms
コンパイル使用メモリ 80,796 KB
実行使用メモリ 100,504 KB
平均クエリ数 44.08
最終ジャッジ日時 2026-03-31 09:51:42
合計ジャッジ時間 3,345 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys


def out(nums):
    print "".join(map(str, nums))
    sys.stdout.flush()
    n, mes = raw_input().split()
    return int(n)


i = 0
nums = [0] * 10
fixed = 0
count = out(nums)
while count < 10:
    nums[fixed] += 1
    ans = out(nums)
    if ans < count:
        nums[fixed] -= 1
        fixed += 1
        ans += 1
    elif ans > count:
        fixed += 1
    count = ans
0