結果

問題 No.2088 数当てゲーム
ユーザー magurofly
提出日時 2022-09-30 21:22:44
言語 Ruby
(3.4.1)
結果
RE  
実行時間 -
コード長 150 bytes
コンパイル時間 57 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,544 KB
最終ジャッジ日時 2024-12-22 22:01:13
合計ジャッジ時間 5,429 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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

ソースコード

diff #

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)
0