結果
問題 | No.1237 EXP Multiple! |
ユーザー | yakeshiba |
提出日時 | 2021-03-07 04:49:31 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 328 bytes |
コンパイル時間 | 236 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 109,184 KB |
最終ジャッジ日時 | 2024-04-17 08:14:53 |
合計ジャッジ時間 | 4,716 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 35 ms
56,704 KB |
testcase_01 | AC | 68 ms
92,288 KB |
testcase_02 | AC | 82 ms
105,964 KB |
testcase_03 | AC | 90 ms
102,016 KB |
testcase_04 | AC | 91 ms
102,144 KB |
testcase_05 | AC | 69 ms
95,744 KB |
testcase_06 | TLE | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
ソースコード
mod = 10**9+7 n = int(input()) A = list(map(int,input().split())) def kaijo(n): ret = 1 for i in range(1,n+1): ret *= i return ret #print(A) ans = 1 for a in A: if a == 0: print(-1) exit() if a >= 4: print(mod) exit() ans *= pow(a,kaijo(a)) print(mod%ans)