結果
| 問題 | No.251 大きな桁の復習問題(1) | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-01-28 15:16:34 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 201 bytes | 
| コンパイル時間 | 1,541 ms | 
| コンパイル使用メモリ | 82,040 KB | 
| 実行使用メモリ | 67,152 KB | 
| 最終ジャッジ日時 | 2024-12-29 11:41:01 | 
| 合計ジャッジ時間 | 3,529 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 9 WA * 1 RE * 11 | 
ソースコード
N = int(input())
M = int(input())
P = 129402307
import sys
N %= P
M %= (P-1)
if N == 0:
    print(0)
    exit()
if M == 0:
    print(1)
    exit()
if N == 1:
    print(1)
    exit()
print(pow(N,M,P))
            
            
            
        