結果
問題 |
No.2768 Password Crack
|
ユーザー |
|
提出日時 | 2024-05-31 22:00:10 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 665 bytes |
コンパイル時間 | 366 ms |
コンパイル使用メモリ | 81,984 KB |
実行使用メモリ | 107,908 KB |
平均クエリ数 | 748.23 |
最終ジャッジ日時 | 2024-12-20 23:24:23 |
合計ジャッジ時間 | 13,471 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 |
other | AC * 1 WA * 24 RE * 4 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random sys.setrecursionlimit(10**9) #sys.set_int_max_str_digits(0) n = int(input()) print('?','z'*n,flush=True) z = int(input()) if z == n: print('!','z'*n,flush=True) exit() ans = ['' for i in range(n)] for i in range(n): temp = ['z' for i in range(n)] for j in range(25): temp[i] = chr(j + ord('a')) print('?',''.join(temp),flush=True) x = int(input()) if x == z-1: ans[j] = 'z' break if x == z +1: ans[j] = temp[j] break print('!',''.join(ans))