結果

問題 No.246 質問と回答
ユーザー McGregorshMcGregorsh
提出日時 2023-05-15 00:41:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 87,472 KB
平均クエリ数 30.90
最終ジャッジ日時 2023-08-20 09:07:52
合計ジャッジ時間 6,334 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
87,124 KB
testcase_01 AC 113 ms
86,720 KB
testcase_02 AC 115 ms
86,680 KB
testcase_03 AC 114 ms
87,004 KB
testcase_04 AC 114 ms
86,884 KB
testcase_05 AC 113 ms
86,948 KB
testcase_06 AC 111 ms
87,372 KB
testcase_07 AC 111 ms
86,656 KB
testcase_08 AC 111 ms
86,812 KB
testcase_09 AC 111 ms
87,376 KB
testcase_10 AC 111 ms
86,876 KB
testcase_11 AC 111 ms
87,204 KB
testcase_12 AC 111 ms
87,104 KB
testcase_13 AC 111 ms
86,840 KB
testcase_14 AC 111 ms
86,996 KB
testcase_15 AC 110 ms
87,244 KB
testcase_16 AC 112 ms
86,920 KB
testcase_17 AC 113 ms
86,852 KB
testcase_18 AC 112 ms
86,828 KB
testcase_19 AC 109 ms
87,092 KB
testcase_20 AC 109 ms
86,956 KB
testcase_21 AC 110 ms
86,896 KB
testcase_22 AC 110 ms
87,244 KB
testcase_23 AC 111 ms
87,472 KB
testcase_24 AC 109 ms
87,264 KB
testcase_25 AC 111 ms
86,928 KB
testcase_26 AC 110 ms
87,432 KB
testcase_27 AC 111 ms
86,992 KB
testcase_28 AC 108 ms
87,052 KB
testcase_29 AC 109 ms
86,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
   
   top = 10 ** 9
   under = 1
   
   while top - under > 1:
   	  mid = (top + under) // 2
   	  print('?', mid)
   	  N = int(input())
   	  if N == 1:
   	  	  under = mid
   	  else:
   	  	  top = mid
   
   print('!', under)
   
if __name__ == '__main__':
    main()
0