結果
| 問題 | No.2007 Arbitrary Mod (Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-02 21:38:42 |
| 言語 | Python3 (3.14.2 + numpy 2.4.0 + scipy 1.16.3) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 248 bytes |
| 記録 | |
| コンパイル時間 | 1,228 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-12-28 16:51:15 |
| 合計ジャッジ時間 | 4,516 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 30 |
ソースコード
def mod_pow(a, b, c):
result = 1
while b > 0:
if b % 2 == 1:
result = (result * a) % c
a = (a * a) % c
b //= 2
return result
a,n=map(int,input().split())
print(mod_pow(a,n,998244353))
print(998244353)