結果
| 問題 | No.2088 数当てゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-30 21:24:13 |
| 言語 | Ruby (4.0.2) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 150 bytes |
| 記録 | |
| コンパイル時間 | 620 ms |
| コンパイル使用メモリ | 8,832 KB |
| 実行使用メモリ | 22,400 KB |
| 最終ジャッジ日時 | 2026-05-29 01:22:42 |
| 合計ジャッジ時間 | 8,619 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 RE * 20 |
コンパイルメッセージ
Main.rb:8: warning: ambiguous first argument; put parentheses or a space even after `-` operator Main.rb:12: warning: possibly useless use of - in void context Syntax OK
ソースコード
A = gets.to_f
B = gets.to_f
if A == 1
if B == 0
puts 1
exit
else
puts -1
exit
end
end
puts - B / (A - 1.0)