結果
問題 |
No.3186 Big Order
|
ユーザー |
|
提出日時 | 2025-07-06 23:29:03 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 395 bytes |
コンパイル時間 | 363 ms |
コンパイル使用メモリ | 81,976 KB |
実行使用メモリ | 83,704 KB |
最終ジャッジ日時 | 2025-07-06 23:29:08 |
合計ジャッジ時間 | 4,070 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | TLE * 1 -- * 34 |
ソースコード
import sys input = sys.stdin.readline t = int(input()) mx = 140 for _ in range(t): a,b,c = map(int,input().split()) l = [0] * mx mul = 1 for i in range(mx): A = mul while(A % c == 0): A//=c l[i]+=1 mul*=a p = 1 for i in range(mx): if(l[i]*p > l[p]*i): p = i print(l[p]*b//p%998244353)