結果

問題 No.1877 俺自身が線グラフになることだ
ユーザー chineristACchineristAC
提出日時 2022-03-18 21:27:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 57 ms / 2,000 ms
コード長 474 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 82,252 KB
実行使用メモリ 64,360 KB
最終ジャッジ日時 2024-04-14 09:12:13
合計ジャッジ時間 1,662 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
63,252 KB
testcase_01 AC 54 ms
63,856 KB
testcase_02 AC 53 ms
63,248 KB
testcase_03 AC 57 ms
63,612 KB
testcase_04 AC 54 ms
63,856 KB
testcase_05 AC 53 ms
64,360 KB
testcase_06 AC 53 ms
63,176 KB
testcase_07 AC 53 ms
62,972 KB
testcase_08 AC 53 ms
63,464 KB
testcase_09 AC 53 ms
63,744 KB
testcase_10 AC 54 ms
63,704 KB
testcase_11 AC 53 ms
63,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,random,bisect
from collections import deque,defaultdict
from heapq import heapify,heappop,heappush
from itertools import permutations
from math import gcd

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

mod = 10**9 + 7

N = 1000
dp = [0 for j in range(N+1)]
dp[0] = 1

for i in range(3,N+1):
    for j in range(N+1-i):
        dp[j+i] += dp[j]
        dp[j+i] %= mod

print(dp[int(input())])
        
0