結果

問題 No.2508 Discriminant
ユーザー Syed Shakil Mahmud (Shajib)
提出日時 2023-10-20 21:54:55
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 390 bytes
コンパイル時間 489 ms
コンパイル使用メモリ 63,824 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-20 18:40:38
合計ジャッジ時間 1,234 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 14 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main() {
    // Read input
    int a, p, q;
    std::cin >> a >> p >> q;

    // Calculate coefficients for the second-degree polynomial ax^2 + bx + c
    int b = -(p + q);
    int c = p * q;

    // Check if b^2 > 4ac
    if (b * b > 4 * a * c) {
        std::cout << "Yes" << std::endl;
    } else {
        std::cout << "No" << std::endl;
    }

    return 0;
}
0