結果
| 問題 | No.2007 Arbitrary Mod (Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-02 21:38:42 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 248 bytes |
| 記録 | |
| コンパイル時間 | 446 ms |
| コンパイル使用メモリ | 20,568 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-06-02 19:05:58 |
| 合計ジャッジ時間 | 8,248 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)