結果
問題 |
No.554 recurrence formula
|
ユーザー |
|
提出日時 | 2020-09-15 02:10:38 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 222 bytes |
コンパイル時間 | 221 ms |
コンパイル使用メモリ | 82,248 KB |
実行使用メモリ | 156,504 KB |
最終ジャッジ日時 | 2024-06-22 01:28:20 |
合計ジャッジ時間 | 5,082 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 WA * 1 RE * 8 TLE * 1 -- * 1 |
ソースコード
n = int(input()) mod = 10 ** 9 + 7 x = 1 y = 0 if n == 1: print(1) exit() for i in range(2, n - 1, 2): y += i * x x += (i + 1) * y if n % 2: y += (n - 1) * x print(n * y) else: print(n * x)