結果
問題 | No.1179 Quadratic Equation |
ユーザー |
|
提出日時 | 2023-10-22 11:19:05 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 150 bytes |
コンパイル時間 | 286 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-09-22 09:36:39 |
合計ジャッジ時間 | 2,276 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 2 |
コンパイルメッセージ
Main.rb:6: warning: ambiguous first argument; put parentheses or a space even after `-' operator Syntax OK
ソースコード
a,b,c=gets.split.map &:to_id=b*b-4*a*cif d<0puts :imaginaryelsif d==0p -b/a/2elseputs [(-b-Math.sqrt(d))/a/2, (-b+Math.sqrt(d))/a/2]*' 'end