結果
問題 |
No.3186 Big Order
|
ユーザー |
![]() |
提出日時 | 2025-06-20 23:29:15 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 249 ms / 2,000 ms |
コード長 | 321 bytes |
コンパイル時間 | 195 ms |
コンパイル使用メモリ | 12,032 KB |
実行使用メモリ | 10,368 KB |
最終ジャッジ日時 | 2025-06-21 02:43:10 |
合計ジャッジ時間 | 7,214 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 35 |
ソースコード
import sys import math T=int(input()) for t in range(T): A,B,C=map(int,input().strip().split(" ")) p = 0 q = 1 num = 0 cur = 1 for i in range(1,136): cur *= A while cur % C == 0: num += 1 cur //= C # if p/q < num / i if p * i < num * q: p = num q = i print(p * B // q % 998244353)