結果

問題 No.1224 I hate Sqrt Inequality
ユーザー 🍮かんプリン
提出日時 2020-09-11 21:25:12
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 497 bytes
コンパイル時間 1,258 ms
コンパイル使用メモリ 158,384 KB
実行使用メモリ 13,632 KB
最終ジャッジ日時 2024-12-26 23:25:40
合計ジャッジ時間 14,078 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7 WA * 2 TLE * 4
権限があれば一括ダウンロードができます

ソースコード

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