結果

問題 No.1237 EXP Multiple!
ユーザー 👑 timitimi
提出日時 2020-09-26 18:22:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 263 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,580 KB
実行使用メモリ 30,688 KB
最終ジャッジ日時 2023-09-11 23:33:30
合計ジャッジ時間 2,678 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,940 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 50 ms
12,084 KB
testcase_06 WA -
testcase_07 AC 51 ms
12,148 KB
testcase_08 WA -
testcase_09 AC 50 ms
12,084 KB
testcase_10 AC 51 ms
12,048 KB
testcase_11 WA -
testcase_12 RE -
testcase_13 AC 93 ms
12,080 KB
testcase_14 AC 90 ms
12,036 KB
testcase_15 AC 94 ms
12,180 KB
testcase_16 AC 87 ms
12,036 KB
testcase_17 AC 92 ms
12,084 KB
testcase_18 AC 99 ms
12,040 KB
testcase_19 AC 51 ms
12,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int, input().split()))
mod=10**9+7
if min(A)==0:
    print(-1)
    exit()
D=[1,1,4,729]
d=1
for i in A:
    if i>4:
        print(0)
        exit()
    else:
        d*=D[i]
    if d>mod:
        print(0)
        exit()
    
print(mod%d)
0