結果
| 問題 |
No.734 Careful Engineer
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-11-03 20:23:31 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 164 bytes |
| コンパイル時間 | 142 ms |
| コンパイル使用メモリ | 7,296 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-11-20 19:34:25 |
| 合計ジャッジ時間 | 2,001 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | WA * 10 |
コンパイルメッセージ
Main.rb:4: warning: ambiguous first argument; put parentheses or a space even after `-' operator Main.rb:12: warning: ambiguous first argument; put parentheses or a space even after `-' operator Syntax OK
ソースコード
A, B, C = gets.split.map(&:to_i)
if 60*A - B == 0 then
puts -1
end
cross = C*3600.0 / (60.0*A - B)
if cross >= 0 then
p cross.ceil + 1
else
p -1
end