結果
問題 | No.1064 ∪∩∩ / Cup Cap Cap |
ユーザー |
👑 |
提出日時 | 2020-05-29 21:58:04 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 360 bytes |
コンパイル時間 | 275 ms |
コンパイル使用メモリ | 6,948 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-06 04:17:35 |
合計ジャッジ時間 | 1,402 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 36 |
ソースコード
a, b = io.read("*n", "*n") c, d = io.read("*n", "*n") det = (a - c) * (a - c) - 8 * (b - d) if det < 0 then print("No") elseif det == 0 then print("Yes") else e = math.sqrt(det) / 4 f = (c - a) / 4 x1, x2 = f - e, f + e y1 = x1 * x1 + a * x1 + b y2 = x2 * x2 + a * x2 + b p = (y2 - y1) / (x2 - x1) q = y1 - x1 * p print(p .. " " .. q) end