結果

問題 No.1081 和の和
ユーザー yuly3yuly3
提出日時 2020-07-30 22:34:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 311 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 87,224 KB
実行使用メモリ 75,800 KB
最終ジャッジ日時 2023-09-18 05:48:59
合計ジャッジ時間 2,176 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,080 KB
testcase_01 AC 74 ms
71,300 KB
testcase_02 AC 74 ms
71,556 KB
testcase_03 AC 75 ms
71,420 KB
testcase_04 AC 77 ms
75,752 KB
testcase_05 AC 73 ms
71,328 KB
testcase_06 AC 74 ms
71,208 KB
testcase_07 AC 79 ms
75,800 KB
testcase_08 AC 77 ms
75,664 KB
testcase_09 AC 74 ms
75,692 KB
testcase_10 AC 76 ms
75,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    MOD = 10 ** 9 + 7
    N = int(rl())
    A = list(map(int, rl().split()))
    
    for _ in range(N - 1):
        A = [(ai + aj) % MOD for ai, aj in zip(A[:-1], A[1:])]
    print(A[0])


if __name__ == '__main__':
    solve()
0