結果

問題 No.1700 floor X
ユーザー simansiman
提出日時 2021-10-10 11:30:18
言語 Ruby
(3.3.0)
結果
AC  
実行時間 251 ms / 2,000 ms
コード長 199 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 11,196 KB
実行使用メモリ 15,476 KB
最終ジャッジ日時 2023-09-16 09:27:11
合計ジャッジ時間 10,794 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,224 KB
testcase_01 AC 113 ms
15,320 KB
testcase_02 AC 106 ms
15,408 KB
testcase_03 AC 107 ms
15,276 KB
testcase_04 AC 108 ms
15,196 KB
testcase_05 AC 108 ms
15,356 KB
testcase_06 AC 106 ms
15,396 KB
testcase_07 AC 108 ms
15,248 KB
testcase_08 AC 108 ms
15,220 KB
testcase_09 AC 107 ms
15,220 KB
testcase_10 AC 108 ms
15,372 KB
testcase_11 AC 108 ms
15,136 KB
testcase_12 AC 108 ms
15,268 KB
testcase_13 AC 109 ms
15,352 KB
testcase_14 AC 108 ms
15,368 KB
testcase_15 AC 108 ms
15,248 KB
testcase_16 AC 108 ms
15,476 KB
testcase_17 AC 107 ms
15,240 KB
testcase_18 AC 107 ms
15,424 KB
testcase_19 AC 108 ms
15,276 KB
testcase_20 AC 106 ms
15,424 KB
testcase_21 AC 244 ms
15,272 KB
testcase_22 AC 245 ms
15,136 KB
testcase_23 AC 241 ms
15,104 KB
testcase_24 AC 243 ms
15,224 KB
testcase_25 AC 244 ms
15,244 KB
testcase_26 AC 244 ms
15,216 KB
testcase_27 AC 249 ms
15,132 KB
testcase_28 AC 247 ms
15,352 KB
testcase_29 AC 245 ms
15,364 KB
testcase_30 AC 243 ms
15,232 KB
testcase_31 AC 245 ms
15,216 KB
testcase_32 AC 245 ms
15,364 KB
testcase_33 AC 242 ms
15,132 KB
testcase_34 AC 247 ms
15,400 KB
testcase_35 AC 247 ms
15,244 KB
testcase_36 AC 249 ms
15,392 KB
testcase_37 AC 247 ms
15,204 KB
testcase_38 AC 250 ms
15,140 KB
testcase_39 AC 246 ms
15,356 KB
testcase_40 AC 246 ms
15,396 KB
testcase_41 AC 249 ms
15,272 KB
testcase_42 AC 80 ms
15,036 KB
testcase_43 AC 251 ms
15,140 KB
testcase_44 AC 251 ms
15,136 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

T = gets.to_i

T.times do
  n = gets.to_i

  ok = 0
  ng = n + 1

  while (ok - ng).abs >= 2
    x = (ok + ng) / 2

    if x ** 2 <= n
      ok = x
    else
      ng = x
    end
  end

  puts ok
end
0