結果

問題 No.1224 I hate Sqrt Inequality
ユーザー 🍮かんプリン🍮かんプリン
提出日時 2020-09-11 21:25:12
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 497 bytes
コンパイル時間 2,052 ms
コンパイル使用メモリ 143,476 KB
実行使用メモリ 8,752 KB
最終ジャッジ日時 2023-08-27 09:02:59
合計ジャッジ時間 4,928 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

/**
 *   @FileName	a.cpp
 *   @Author	kanpurin
 *   @Created	2020.09.11 21:25:09
**/

#include "bits/stdc++.h" 
using namespace std; 
typedef long long ll;


template<typename T>
T _gcd(T a, T b) {
    return b ? _gcd(b, a%b) : a;
}
int main() {
    int a,b;cin >> a >> b;
    int g = _gcd(a,b);
    b /= g;
    while(b % 2 == 0) {
        b /= 2;
    }
    while(b % 5 == 0) {
        b /= 5;
    }
    if (b != 1) {
        puts("Yes");
    }
    else {
        puts("No");
    }
    return 0;
}
0