結果

問題 No.1936 Rational Approximation
ユーザー noya2noya2
提出日時 2021-12-20 15:56:40
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 428 bytes
コンパイル時間 7,230 ms
コンパイル使用メモリ 305,860 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-20 06:43:05
合計ジャッジ時間 8,119 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

/*
入力 validation。WA なら OK。
*/

#include "testlib.h"
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const ll maxint = 1'000'000'000LL;
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}

int main(){
	registerValidation();
    ll p = inf.readLong(2LL,maxint-1LL,"p");
    inf.readSpace();
    ll q = inf.readLong(p+1,maxint,"q");
    inf.readEoln();
    assert(gcd(p,q) == 1LL);
	inf.readEof();
	return 0;
}
0