結果
問題 | No.246 質問と回答 |
ユーザー | jitomesky |
提出日時 | 2015-08-01 14:45:22 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 636 bytes |
コンパイル時間 | 71 ms |
コンパイル使用メモリ | 10,884 KB |
実行使用メモリ | 24,336 KB |
平均クエリ数 | 101.00 |
最終ジャッジ日時 | 2023-09-23 07:26:09 |
合計ジャッジ時間 | 3,649 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 63 ms
24,012 KB |
testcase_01 | AC | 60 ms
23,880 KB |
testcase_02 | AC | 59 ms
23,356 KB |
testcase_03 | AC | 61 ms
23,568 KB |
testcase_04 | AC | 61 ms
23,816 KB |
testcase_05 | AC | 60 ms
24,312 KB |
testcase_06 | AC | 60 ms
24,012 KB |
testcase_07 | AC | 60 ms
24,012 KB |
testcase_08 | AC | 59 ms
24,012 KB |
testcase_09 | AC | 60 ms
23,904 KB |
testcase_10 | AC | 60 ms
23,512 KB |
testcase_11 | AC | 59 ms
23,616 KB |
testcase_12 | AC | 57 ms
24,300 KB |
testcase_13 | AC | 58 ms
23,748 KB |
testcase_14 | WA | - |
testcase_15 | AC | 58 ms
23,712 KB |
testcase_16 | AC | 59 ms
23,616 KB |
testcase_17 | AC | 60 ms
23,520 KB |
testcase_18 | WA | - |
testcase_19 | AC | 60 ms
23,776 KB |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
ソースコード
import sys def question(num): print("? " + str(num)) sys.stdout.flush() n = int(input()) if n == 1: return True else: return False def result(num): print("! " + str(num)) sys.stdout.flush() # main max_num = 1000000000 judge = int(max_num / 2) min_num = 1 for i in range(0,100): r = question(judge) if r == True: # higer or equal min_num = judge judge = int((max_num - min_num) / 2) + min_num else: # low max_num = judge judge = int(max_num / 2) #print("max = %d" % max_num) #print("min = %d" % min_num) result(min_num)