結果

問題 No.2088 数当てゲーム
ユーザー magurofly
提出日時 2022-09-30 21:25:56
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 149 bytes
コンパイル時間 457 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-12-22 22:14:10
合計ジャッジ時間 5,411 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:8: 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

ソースコード

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