結果

問題 No.1081 和の和
ユーザー netyo715netyo715
提出日時 2022-08-04 00:21:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 173 bytes
コンパイル時間 885 ms
コンパイル使用メモリ 86,744 KB
実行使用メモリ 75,776 KB
最終ジャッジ日時 2023-10-11 19:58:09
合計ジャッジ時間 2,445 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,160 KB
testcase_01 AC 72 ms
71,008 KB
testcase_02 AC 73 ms
71,184 KB
testcase_03 AC 74 ms
71,160 KB
testcase_04 AC 79 ms
75,672 KB
testcase_05 AC 75 ms
71,316 KB
testcase_06 AC 76 ms
71,224 KB
testcase_07 AC 78 ms
75,548 KB
testcase_08 AC 77 ms
75,540 KB
testcase_09 AC 78 ms
75,648 KB
testcase_10 AC 78 ms
75,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
MOD = 10**9+7
for i in reversed(range(N)):
    for j in range(i):
        A[j] += A[j+1]
        A[j] %= MOD
print(A[0])
0