結果

問題 No.3186 Big Order
ユーザー fumofumofuni
提出日時 2025-06-20 23:17:14
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 282 bytes
コンパイル時間 245 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 10,240 KB
最終ジャッジ日時 2025-06-20 23:17:20
合計ジャッジ時間 5,929 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 11 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

t=int(input())
for _ in range(t):
    a,b,c=map(int,input().split())
    cnt=0
    while a%c==0:
        a//=c
        cnt+=1
    cnt*=b
    d=1
    for i in range(1,200):
        d*=a
        if d%c==0:
            cnt+=b//i
            break
    print(cnt%998244353)



    





0