結果
問題 |
No.1010 折って重ねて
|
ユーザー |
|
提出日時 | 2020-03-20 21:32:42 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 80 ms / 2,000 ms |
コード長 | 386 bytes |
コンパイル時間 | 112 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-12-15 04:21:30 |
合計ジャッジ時間 | 5,127 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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