結果
問題 | No.246 質問と回答 |
ユーザー | sette-piani |
提出日時 | 2017-01-28 15:17:25 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 604 bytes |
コンパイル時間 | 119 ms |
コンパイル使用メモリ | 10,640 KB |
実行使用メモリ | 24,420 KB |
平均クエリ数 | 82.07 |
最終ジャッジ日時 | 2023-09-23 12:39:32 |
合計ジャッジ時間 | 3,669 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | AC | 55 ms
23,592 KB |
testcase_08 | AC | 56 ms
23,500 KB |
testcase_09 | RE | - |
testcase_10 | AC | 57 ms
23,692 KB |
testcase_11 | RE | - |
testcase_12 | AC | 55 ms
23,460 KB |
testcase_13 | RE | - |
testcase_14 | AC | 56 ms
23,664 KB |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | RE | - |
testcase_19 | RE | - |
testcase_20 | RE | - |
testcase_21 | RE | - |
testcase_22 | RE | - |
testcase_23 | RE | - |
testcase_24 | RE | - |
testcase_25 | AC | 55 ms
24,372 KB |
testcase_26 | RE | - |
testcase_27 | AC | 55 ms
23,964 KB |
testcase_28 | RE | - |
testcase_29 | AC | 55 ms
24,276 KB |
ソースコード
def main(): t = 10**9//2 a = t m = 0 M = 10**9 while True: t //= 2 print("? {0:}".format(a)) if "1" == input(): m = a a += t else: M = a a -= t if m + 1 == M: break print("! {0:}".format(m)) if __name__ == "__main__": import sys import os if len(sys.argv) > 1: if sys.argv[1] == "-d": #filename = "input1.txt" #fd = os.open(filename, os.O_RDONLY) #os.dup2(fd, sys.stdin.fileno()) main() else: main()