結果
| 問題 | 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_i d=b*b-4*a*c if d<0 puts :imaginary elsif d==0 p -b/a/2 else puts [(-b-Math.sqrt(d))/a/2, (-b+Math.sqrt(d))/a/2]*' ' end