結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー ぷらぷら
提出日時 2021-10-29 21:25:47
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 648 bytes
コンパイル時間 2,428 ms
コンパイル使用メモリ 200,840 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-16 14:01:51
合計ジャッジ時間 6,030 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 13 ms
5,376 KB
testcase_09 AC 38 ms
5,376 KB
testcase_10 AC 4 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 5 ms
5,376 KB
testcase_15 AC 23 ms
5,376 KB
testcase_16 AC 16 ms
5,376 KB
testcase_17 WA -
testcase_18 AC 6 ms
5,376 KB
testcase_19 AC 12 ms
5,376 KB
testcase_20 AC 3 ms
5,376 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 2 ms
5,376 KB
testcase_28 AC 7 ms
5,376 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 11 ms
5,376 KB
testcase_32 AC 3 ms
5,376 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 13 ms
5,376 KB
testcase_37 AC 2 ms
5,376 KB
testcase_38 AC 2 ms
5,376 KB
testcase_39 AC 1 ms
5,376 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 2 ms
5,376 KB
testcase_44 WA -
testcase_45 AC 2 ms
5,376 KB
testcase_46 WA -
testcase_47 WA -
testcase_48 AC 2 ms
5,376 KB
testcase_49 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    long long a,b,c,d;
    cin >> a >> b >> c >> d;
    map<long long,long long>mp1,mp2;
    for(long long i = 2; i*i <= a; i++) {
        while (a%i == 0) {
            mp1[i] += c;
            a /= i;
        }
    }
    if(a > 1) {
        mp1[a] += c;
    }
    for(long long i = 2; i*i <= b; i++) {
        while (b%i == 0) {
            mp2[i] += d;
            b /= i;
        }
    }
    if(b > 1) {
        mp2[b]++;
    }
    bool f = true;
    for(auto i:mp2) {
        if(mp1[i.first]%i.second) {
            f = false;
        }
    }
    cout << ((f)?"Yes":"No") << endl;
}
0