結果

問題 No.1237 EXP Multiple!
ユーザー 👑 rin204rin204
提出日時 2020-09-29 12:07:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 321 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 30,136 KB
最終ジャッジ日時 2023-09-16 17:53:19
合計ジャッジ時間 2,620 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,920 KB
testcase_01 AC 63 ms
23,684 KB
testcase_02 AC 79 ms
29,236 KB
testcase_03 AC 78 ms
30,136 KB
testcase_04 AC 83 ms
29,864 KB
testcase_05 AC 49 ms
12,100 KB
testcase_06 AC 51 ms
12,068 KB
testcase_07 AC 50 ms
12,116 KB
testcase_08 AC 89 ms
12,064 KB
testcase_09 AC 49 ms
12,112 KB
testcase_10 AC 49 ms
12,092 KB
testcase_11 AC 51 ms
12,168 KB
testcase_12 AC 83 ms
12,164 KB
testcase_13 AC 90 ms
12,044 KB
testcase_14 AC 87 ms
12,112 KB
testcase_15 AC 90 ms
12,140 KB
testcase_16 AC 88 ms
12,156 KB
testcase_17 AC 98 ms
12,172 KB
testcase_18 AC 92 ms
12,204 KB
testcase_19 AC 52 ms
12,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
alst = list(map(int, input().split()))
f = [1, 2 ** 2, 3 ** 6]
ans = 1
if 0 in alst:
    print(-1)
    exit()
for a in alst:
    if a >= 4:
        print(10 ** 9 + 7)
        break
    ans *= f[a - 1]
    if ans > 10 ** 9 + 7:
        print(10 ** 9 + 7)
        break
else:
    print((10 ** 9 + 7) % ans)
0