結果

問題 No.1081 和の和
ユーザー brthyyjpbrthyyjp
提出日時 2020-06-24 21:18:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 237 bytes
コンパイル時間 1,818 ms
コンパイル使用メモリ 86,464 KB
実行使用メモリ 76,268 KB
最終ジャッジ日時 2023-09-16 21:20:43
合計ジャッジ時間 2,245 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
71,404 KB
testcase_01 AC 91 ms
71,400 KB
testcase_02 AC 90 ms
71,236 KB
testcase_03 AC 91 ms
71,484 KB
testcase_04 AC 96 ms
76,172 KB
testcase_05 AC 91 ms
71,716 KB
testcase_06 AC 91 ms
71,512 KB
testcase_07 AC 93 ms
76,004 KB
testcase_08 AC 94 ms
76,000 KB
testcase_09 AC 94 ms
76,268 KB
testcase_10 AC 94 ms
76,012 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

mod = 10**9+7

import copy
for i in range(1, n):
    A_ = copy.copy(A)
    for j in range(n-i):
        A_[j] = A[j]+A[j+1]
        A_[j] %= mod
    A = copy.copy(A_)
print(A[0]%mod)
0