結果

問題 No.3354 有理数の大小比較
コンテスト
ユーザー SnowBeenDiding
提出日時 2025-11-14 21:26:14
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 467 bytes
コンパイル時間 5,107 ms
コンパイル使用メモリ 335,084 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-11-14 21:26:25
合計ジャッジ時間 6,479 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#include <atcoder/all>
#define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
using namespace atcoder;
using namespace std;

typedef long long ll;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(12);
    ll p0, q0, p1, q1;
    cin >> p0 >> q0 >> p1 >> q1;
    string ans = "=";
    if (p0 * q1 > p1 * q0) ans = ">";
    if (p0 * q1 < p1 * q0) ans = "<";
    cout << ans << endl;
}
0