結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー nawawannawawan
提出日時 2021-10-29 21:37:59
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 717 bytes
コンパイル時間 2,206 ms
コンパイル使用メモリ 201,936 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-16 14:21:37
合計ジャッジ時間 3,627 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
    long long X, A, Y, B;
    cin >> X >> A >> Y >> B;
    map<long long, long long> mx, my;
    for(long long i = 2; i * i <= X; i++){
        while(X % i == 0){
            mx[i]++;
            X /= i;
        }
    }
    if(X != 1) mx[X]++;
    for(auto v : mx){
        v.second *= A;
    }
    for(long long i = 2; i * i <= Y; i++){
        while(Y % i == 0){
            my[i]++; 
            Y /= i;   
        }
    }
    if(Y != 1) my[Y]++;
    for(auto v : my){
        v.second *= B;
    }
    bool f = true;
    for(auto v : my){
        if(v.second > mx[v.first]) f = false;
    }
    if(f) cout << "Yes" << endl;
    else cout << "No" << endl;
}
0