結果

問題 No.246 質問と回答
ユーザー jjjj
提出日時 2016-08-29 14:05:51
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 328 bytes
コンパイル時間 1,563 ms
コンパイル使用メモリ 25,264 KB
実行使用メモリ 24,456 KB
平均クエリ数 30.90
最終ジャッジ日時 2023-09-23 20:17:21
合計ジャッジ時間 4,565 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
23,364 KB
testcase_01 AC 39 ms
23,628 KB
testcase_02 AC 38 ms
24,036 KB
testcase_03 AC 39 ms
24,456 KB
testcase_04 AC 39 ms
23,400 KB
testcase_05 AC 40 ms
24,000 KB
testcase_06 AC 39 ms
23,688 KB
testcase_07 AC 40 ms
24,384 KB
testcase_08 AC 38 ms
24,240 KB
testcase_09 AC 40 ms
23,472 KB
testcase_10 AC 40 ms
24,000 KB
testcase_11 AC 40 ms
23,376 KB
testcase_12 AC 40 ms
23,616 KB
testcase_13 AC 41 ms
23,820 KB
testcase_14 AC 41 ms
23,400 KB
testcase_15 AC 40 ms
24,336 KB
testcase_16 AC 40 ms
23,436 KB
testcase_17 AC 41 ms
23,604 KB
testcase_18 AC 40 ms
23,700 KB
testcase_19 AC 39 ms
23,820 KB
testcase_20 AC 39 ms
24,408 KB
testcase_21 AC 39 ms
23,976 KB
testcase_22 AC 39 ms
23,820 KB
testcase_23 AC 40 ms
23,580 KB
testcase_24 AC 38 ms
24,084 KB
testcase_25 AC 40 ms
24,048 KB
testcase_26 AC 40 ms
23,388 KB
testcase_27 AC 41 ms
23,400 KB
testcase_28 AC 39 ms
23,628 KB
testcase_29 AC 41 ms
24,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

program main
  implicit none
  integer*8::N,i
  integer*8::lower=1,mid,upper=10**9
  do i=1,101
     mid = (lower+upper)/2_8

     print '("? ",i0)',mid
     read *,N
     if(N.eq.1) then
        lower=mid
     else
        upper=mid
     end if
     if(upper.le.lower+1) exit
  end do
  print '("! ",i0)',lower
end program main
0