結果

問題 No.741 AscNumber(Easy)
ユーザー O2MTO2MT
提出日時 2021-06-02 00:17:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 634 ms / 2,000 ms
コード長 363 bytes
コンパイル時間 227 ms
コンパイル使用メモリ 82,160 KB
実行使用メモリ 154,128 KB
最終ジャッジ日時 2024-04-26 09:57:00
合計ジャッジ時間 12,000 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
52,096 KB
testcase_01 AC 41 ms
52,480 KB
testcase_02 AC 40 ms
52,608 KB
testcase_03 AC 38 ms
52,096 KB
testcase_04 AC 39 ms
52,096 KB
testcase_05 AC 38 ms
52,224 KB
testcase_06 AC 39 ms
52,224 KB
testcase_07 AC 39 ms
51,840 KB
testcase_08 AC 39 ms
52,352 KB
testcase_09 AC 38 ms
52,096 KB
testcase_10 AC 39 ms
51,968 KB
testcase_11 AC 39 ms
52,608 KB
testcase_12 AC 40 ms
52,352 KB
testcase_13 AC 39 ms
52,096 KB
testcase_14 AC 39 ms
52,736 KB
testcase_15 AC 40 ms
52,540 KB
testcase_16 AC 39 ms
52,096 KB
testcase_17 AC 40 ms
51,968 KB
testcase_18 AC 39 ms
52,480 KB
testcase_19 AC 39 ms
52,480 KB
testcase_20 AC 51 ms
61,568 KB
testcase_21 AC 50 ms
61,056 KB
testcase_22 AC 52 ms
61,568 KB
testcase_23 AC 51 ms
61,696 KB
testcase_24 AC 51 ms
61,568 KB
testcase_25 AC 49 ms
61,056 KB
testcase_26 AC 49 ms
60,928 KB
testcase_27 AC 49 ms
60,544 KB
testcase_28 AC 50 ms
60,544 KB
testcase_29 AC 50 ms
60,928 KB
testcase_30 AC 52 ms
61,312 KB
testcase_31 AC 49 ms
60,800 KB
testcase_32 AC 48 ms
60,416 KB
testcase_33 AC 49 ms
61,184 KB
testcase_34 AC 52 ms
62,336 KB
testcase_35 AC 610 ms
150,500 KB
testcase_36 AC 304 ms
108,544 KB
testcase_37 AC 345 ms
114,048 KB
testcase_38 AC 345 ms
113,784 KB
testcase_39 AC 300 ms
107,700 KB
testcase_40 AC 381 ms
119,456 KB
testcase_41 AC 562 ms
143,696 KB
testcase_42 AC 333 ms
112,256 KB
testcase_43 AC 255 ms
102,040 KB
testcase_44 AC 449 ms
129,124 KB
testcase_45 AC 483 ms
133,692 KB
testcase_46 AC 574 ms
146,976 KB
testcase_47 AC 148 ms
87,936 KB
testcase_48 AC 581 ms
147,072 KB
testcase_49 AC 499 ms
135,208 KB
testcase_50 AC 124 ms
83,968 KB
testcase_51 AC 265 ms
103,180 KB
testcase_52 AC 632 ms
153,912 KB
testcase_53 AC 634 ms
154,128 KB
testcase_54 AC 629 ms
153,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
MOD = 10**9+7
dp = [[0 for _ in range(N+1)] for _ in range(10)]

for i in range(1,10):
  dp[i][1] = 1
for i in range(1,10):
  for j in range(2,N+1):
    num = 0
    for k in range(1,i+1):
      num += dp[k][j-1]
      num %= MOD
    dp[i][j] = num

ans = 1
for i in range(10):
  for j in range(N+1):
    ans += dp[i][j]
    ans %= MOD

print(ans)
0