結果
| 問題 | No.2326 Factorial to the Power of Factorial to the... |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-28 15:39:36 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 186 bytes |
| 記録 | |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 24,552 KB |
| 最終ジャッジ日時 | 2026-10-08 13:16:05 |
| 合計ジャッジ時間 | 11,337 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | TLE * 1 -- * 19 |
ソースコード
N, P = map(int, input().split())
A = int(N ** (N**N))
mod = 10**9 + 7
B = 0
while A != 0:
if A % P == 0:
A = int(A // P)
B += 1
else:
break
print(B % mod)