結果
| 問題 | No.741 AscNumber(Easy) | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-10-05 21:29:11 | 
| 言語 | D (dmd 2.109.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 372 ms / 2,000 ms | 
| コード長 | 584 bytes | 
| コンパイル時間 | 884 ms | 
| コンパイル使用メモリ | 112,384 KB | 
| 実行使用メモリ | 116,480 KB | 
| 最終ジャッジ日時 | 2024-06-13 01:50:20 | 
| 合計ジャッジ時間 | 7,230 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 55 | 
ソースコード
import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;
immutable long MOD = 10^^9 + 7;
void main() {
    auto L = readln.chomp.to!int;
    auto dp = new long[][](L+1, 10);
    dp[0][0] = 1;
    foreach (i; 0..L) {
        foreach (j; 0..10) {
            foreach (k; j..10) {
                (dp[i+1][k] += dp[i][j]) %= MOD;
            }
        }
    }
    long ans = 0;
    foreach (i; 0..10) (ans += dp[L][i]) %= MOD;
    ans.writeln;
}
            
            
            
        