結果
問題 | No.1237 EXP Multiple! |
ユーザー | daikisuyama |
提出日時 | 2020-09-26 11:07:47 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 273 bytes |
コンパイル時間 | 295 ms |
コンパイル使用メモリ | 86,704 KB |
実行使用メモリ | 109,544 KB |
最終ジャッジ日時 | 2023-09-11 06:57:05 |
合計ジャッジ時間 | 4,883 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 73 ms
75,180 KB |
testcase_01 | AC | 109 ms
97,952 KB |
testcase_02 | AC | 124 ms
99,800 KB |
testcase_03 | AC | 127 ms
100,096 KB |
testcase_04 | AC | 125 ms
99,412 KB |
testcase_05 | AC | 106 ms
103,532 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 | -- | - |
ソースコード
n=int(input()) a=list(map(int,input().split())) #ギャグ mod=10**9+7 if max(a)>3: print(mod) exit() if min(a)==0: print(-1) exit() ans=1 for i in a: sub=1 for j in range(i): sub*=(j+1) ans*=(i**sub) print(mod%ans if mod%ans!=0 else -1)