結果

問題 No.1081 和の和
ユーザー mlihua09mlihua09
提出日時 2020-08-29 19:01:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 171 bytes
コンパイル時間 2,713 ms
コンパイル使用メモリ 81,940 KB
実行使用メモリ 59,072 KB
最終ジャッジ日時 2024-04-27 01:14:24
合計ジャッジ時間 3,906 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,072 KB
testcase_01 AC 34 ms
53,080 KB
testcase_02 AC 34 ms
52,620 KB
testcase_03 AC 35 ms
52,648 KB
testcase_04 AC 36 ms
58,108 KB
testcase_05 AC 34 ms
53,456 KB
testcase_06 AC 35 ms
52,384 KB
testcase_07 AC 38 ms
59,072 KB
testcase_08 AC 38 ms
57,728 KB
testcase_09 AC 37 ms
58,796 KB
testcase_10 AC 36 ms
58,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P = 10 ** 9 + 7

N = int(input())

A = list(map(int, input().split()))

for i in range(N - 1):
    
    A = [(A[j] + A[j + 1]) % P for j in range(N - i - 1)]

print(A[0])
0