結果
| 問題 | No.1010 折って重ねて |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-20 21:32:42 |
| 言語 | Ruby (4.0.2) |
| 結果 |
AC
|
| 実行時間 | 52 ms / 2,000 ms |
| コード長 | 386 bytes |
| 記録 | |
| コンパイル時間 | 213 ms |
| コンパイル使用メモリ | 9,216 KB |
| 実行使用メモリ | 14,976 KB |
| 最終ジャッジ日時 | 2026-05-25 17:59:48 |
| 合計ジャッジ時間 | 4,409 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
コンパイルメッセージ
Syntax OK
ソースコード
x,y,h = gets.split.map(&:to_i)
x *= 1000
y *= 1000
ans = 0
x_big = true
while [x,y].max > h do
if x < y
x_big = false
end
if x_big
if y > h
y /= 2.0
else
x /= 2.0
end
else
if x > h
x /= 2.0
else
y /= 2.0
end
end
h *= 2
ans += 1
end
p ans