結果
問題 | No.305 鍵(2) |
ユーザー |
![]() |
提出日時 | 2021-04-22 23:54:46 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 56 ms / 2,000 ms |
コード長 | 666 bytes |
コンパイル時間 | 192 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 27,480 KB |
平均クエリ数 | 32.15 |
最終ジャッジ日時 | 2024-07-17 03:01:56 |
合計ジャッジ時間 | 2,029 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
def read(): x, txt = input().split() return int(x) match = 0 ok = [-1] * 10 for i in range(10): tmp = [i if x == -1 else x for x in ok] print(*tmp, sep="") cnt = read() if cnt == 10: exit() found = cnt - match if not found: continue for j in range(10): if tmp[j] == i: tmp[j] = (i + 1) % 10 print(*tmp, sep="") c = read() if c == 10: exit() if c - match == found + 1: ok[j] = tmp[j] if c - match == found - 1: ok[j] = i tmp[j] = i match += found print(*ok, sep="\n")