結果

問題 No.1081 和の和
ユーザー tomoyaatcodertomoyaatcoder
提出日時 2020-08-01 18:22:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 86,964 KB
実行使用メモリ 75,632 KB
最終ジャッジ日時 2023-09-22 11:20:39
合計ジャッジ時間 2,186 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,320 KB
testcase_01 AC 72 ms
71,064 KB
testcase_02 AC 72 ms
71,156 KB
testcase_03 AC 74 ms
71,216 KB
testcase_04 AC 82 ms
75,516 KB
testcase_05 AC 73 ms
71,156 KB
testcase_06 AC 73 ms
71,268 KB
testcase_07 AC 77 ms
75,632 KB
testcase_08 AC 75 ms
75,588 KB
testcase_09 AC 77 ms
75,344 KB
testcase_10 AC 79 ms
75,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10 ** 9 + 7

def convert(A):
    N = len(A)
    ret = [0 for i in range(N - 1)]
    for i in range(N - 1):
        ret[i] = A[i] + A[i + 1]
    return ret

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

for i in range(N - 1):
    A = convert(A)
print(A[0] % MOD)
0