結果

問題 No.1700 floor X
ユーザー abcabc
提出日時 2021-10-22 14:11:56
言語 Ruby
(3.3.0)
結果
AC  
実行時間 255 ms / 2,000 ms
コード長 176 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 11,244 KB
実行使用メモリ 15,416 KB
最終ジャッジ日時 2023-09-16 09:34:18
合計ジャッジ時間 13,569 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,064 KB
testcase_01 AC 249 ms
15,160 KB
testcase_02 AC 248 ms
15,396 KB
testcase_03 AC 248 ms
15,232 KB
testcase_04 AC 247 ms
15,324 KB
testcase_05 AC 248 ms
15,388 KB
testcase_06 AC 248 ms
15,156 KB
testcase_07 AC 248 ms
15,400 KB
testcase_08 AC 249 ms
15,180 KB
testcase_09 AC 250 ms
15,328 KB
testcase_10 AC 248 ms
15,340 KB
testcase_11 AC 250 ms
15,224 KB
testcase_12 AC 249 ms
15,292 KB
testcase_13 AC 249 ms
15,292 KB
testcase_14 AC 249 ms
15,192 KB
testcase_15 AC 251 ms
15,344 KB
testcase_16 AC 247 ms
15,416 KB
testcase_17 AC 250 ms
15,316 KB
testcase_18 AC 249 ms
15,400 KB
testcase_19 AC 249 ms
15,312 KB
testcase_20 AC 248 ms
15,272 KB
testcase_21 AC 252 ms
15,228 KB
testcase_22 AC 252 ms
15,232 KB
testcase_23 AC 253 ms
15,200 KB
testcase_24 AC 253 ms
15,324 KB
testcase_25 AC 252 ms
15,160 KB
testcase_26 AC 255 ms
15,168 KB
testcase_27 AC 254 ms
15,384 KB
testcase_28 AC 253 ms
15,116 KB
testcase_29 AC 254 ms
15,156 KB
testcase_30 AC 252 ms
15,112 KB
testcase_31 AC 253 ms
15,396 KB
testcase_32 AC 253 ms
15,340 KB
testcase_33 AC 254 ms
15,388 KB
testcase_34 AC 250 ms
14,992 KB
testcase_35 AC 251 ms
15,412 KB
testcase_36 AC 254 ms
15,164 KB
testcase_37 AC 253 ms
15,232 KB
testcase_38 AC 251 ms
15,236 KB
testcase_39 AC 253 ms
15,120 KB
testcase_40 AC 255 ms
15,400 KB
testcase_41 AC 250 ms
15,244 KB
testcase_42 AC 76 ms
14,932 KB
testcase_43 AC 255 ms
15,156 KB
testcase_44 AC 255 ms
15,312 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:10: warning: mismatched indentations at 'else' with 'if' at 8
Main.rb:11: warning: mismatched indentations at 'end' with 'else' at 10
Syntax OK

ソースコード

diff #

t = gets.to_i
t.times do
	n = gets.to_i
	l = 0
	r = 1e20
	while (r - l > 1) do
		mid = (l + r).div(2)
		if (mid * mid <= n) 
			then l = mid
			else r = mid
		end
	end
	p l
end
0