結果

問題 No.741 AscNumber(Easy)
ユーザー O2MTO2MT
提出日時 2021-06-02 00:17:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 641 ms / 2,000 ms
コード長 363 bytes
コンパイル時間 2,022 ms
コンパイル使用メモリ 87,084 KB
実行使用メモリ 155,144 KB
最終ジャッジ日時 2023-08-08 17:22:48
合計ジャッジ時間 14,628 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,508 KB
testcase_01 AC 71 ms
71,060 KB
testcase_02 AC 71 ms
71,456 KB
testcase_03 AC 72 ms
71,380 KB
testcase_04 AC 70 ms
71,400 KB
testcase_05 AC 70 ms
71,380 KB
testcase_06 AC 69 ms
71,516 KB
testcase_07 AC 69 ms
71,308 KB
testcase_08 AC 71 ms
71,328 KB
testcase_09 AC 73 ms
71,216 KB
testcase_10 AC 73 ms
71,240 KB
testcase_11 AC 70 ms
71,488 KB
testcase_12 AC 72 ms
71,424 KB
testcase_13 AC 72 ms
71,316 KB
testcase_14 AC 73 ms
71,308 KB
testcase_15 AC 71 ms
71,284 KB
testcase_16 AC 72 ms
71,520 KB
testcase_17 AC 72 ms
71,284 KB
testcase_18 AC 71 ms
71,452 KB
testcase_19 AC 73 ms
71,488 KB
testcase_20 AC 79 ms
76,496 KB
testcase_21 AC 79 ms
76,496 KB
testcase_22 AC 80 ms
76,232 KB
testcase_23 AC 83 ms
76,604 KB
testcase_24 AC 85 ms
76,404 KB
testcase_25 AC 79 ms
76,536 KB
testcase_26 AC 79 ms
76,472 KB
testcase_27 AC 83 ms
76,404 KB
testcase_28 AC 80 ms
76,520 KB
testcase_29 AC 78 ms
76,480 KB
testcase_30 AC 82 ms
76,588 KB
testcase_31 AC 80 ms
76,508 KB
testcase_32 AC 79 ms
76,472 KB
testcase_33 AC 81 ms
76,704 KB
testcase_34 AC 81 ms
76,664 KB
testcase_35 AC 610 ms
151,476 KB
testcase_36 AC 322 ms
109,612 KB
testcase_37 AC 362 ms
115,108 KB
testcase_38 AC 358 ms
114,712 KB
testcase_39 AC 317 ms
108,728 KB
testcase_40 AC 395 ms
120,340 KB
testcase_41 AC 567 ms
144,956 KB
testcase_42 AC 345 ms
113,032 KB
testcase_43 AC 275 ms
102,844 KB
testcase_44 AC 467 ms
129,852 KB
testcase_45 AC 489 ms
134,256 KB
testcase_46 AC 586 ms
148,064 KB
testcase_47 AC 175 ms
89,060 KB
testcase_48 AC 582 ms
147,908 KB
testcase_49 AC 504 ms
136,132 KB
testcase_50 AC 144 ms
85,024 KB
testcase_51 AC 287 ms
104,428 KB
testcase_52 AC 641 ms
155,144 KB
testcase_53 AC 631 ms
154,844 KB
testcase_54 AC 627 ms
154,420 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