結果
| 問題 | No.2326 Factorial to the Power of Factorial to the... |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-28 15:39:36 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 186 bytes |
| 記録 | |
| コンパイル時間 | 462 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 31,980 KB |
| 最終ジャッジ日時 | 2026-06-01 23:32:17 |
| 合計ジャッジ時間 | 7,546 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_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)