結果
問題 |
No.1224 I hate Sqrt Inequality
|
ユーザー |
![]() |
提出日時 | 2020-09-11 22:10:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 700 bytes |
コンパイル時間 | 1,731 ms |
コンパイル使用メモリ | 170,180 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-27 14:49:49 |
合計ジャッジ時間 | 2,647 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 10 WA * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; using ul = unsigned long; using ull = unsigned long long; vector<pair<ll, ll> > primeFactorize(ll n) { vector<pair<ll, ll> > res; for (ll a = 2; a * a <= n; ++a) { if (n % a != 0) continue; ll ex = 0; while (n % a == 0) { ++ex; n /= a; } res.push_back({ a, ex }); } if (n != 1) res.push_back({ n, 1 }); return res; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll a, b; cin >> a >> b; vector<pair<ll, ll> > v = primeFactorize(b); for (const auto& it : v) { if (it.first !=2 && it.first != 5) { cout << "Yes\n"; return 0; } } cout << "No\n"; return 0; }