結果
| 問題 | No.251 大きな桁の復習問題(1) | 
| コンテスト | |
| ユーザー |  ntuda | 
| 提出日時 | 2025-08-02 15:58:50 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 223 bytes | 
| コンパイル時間 | 344 ms | 
| コンパイル使用メモリ | 82,368 KB | 
| 実行使用メモリ | 74,336 KB | 
| 最終ジャッジ日時 | 2025-08-02 15:58:53 | 
| 合計ジャッジ時間 | 2,697 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 20 WA * 1 | 
ソースコード
N = input()
M = input()
p = 129402307
n, m = 0, 0
for s in N:
    n *= 10
    n += int(s)
    n %= p
for s in M:
    m *= 10
    m += int(s)
    m %= (p - 1)
if n == 0 and m == 0:
    print(0)
else:
    print(pow(n, m, p))
            
            
            
        