結果
問題 |
No.3246 80% Accuracy Calculator
|
ユーザー |
![]() |
提出日時 | 2025-08-22 23:34:01 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 945 bytes |
コンパイル時間 | 220 ms |
コンパイル使用メモリ | 82,504 KB |
実行使用メモリ | 73,308 KB |
平均クエリ数 | 11.00 |
最終ジャッジ日時 | 2025-08-22 23:34:07 |
合計ジャッジ時間 | 5,414 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 42 |
ソースコード
from collections import defaultdict def ask(cnt, var): best_cnt = 0 result = -1 Cnts = defaultdict(int) for i in range(cnt): print("?", var) x = int(input()) Cnts[x] += 1 if(Cnts[x] > best_cnt): best_cnt = Cnts[x] result = x return result ask_cnt = 5 x = ask(ask_cnt, "A") y = ask(ask_cnt, "B") print("!", "CB"[y % 2]) exit() A = x B = y C = 0 for i in range(y): while True: if(i % 2 == 0): print("+", "A", "C", "B") z = int(input()) if(z != 0): exit() result = ask(ask_cnt, "B") if(result == x * (i + 1)): break else: print("+", "A", "B", "C") z = int(input()) if(z != 0): exit() result = ask(ask_cnt, "C") if(result == x * (i + 1)): break print("!", "CB"[y % 2])