結果

問題 No.741 AscNumber(Easy)
ユーザー clocklrclocklr
提出日時 2018-10-05 22:13:07
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 208 ms / 2,000 ms
コード長 641 bytes
コンパイル時間 5,389 ms
コンパイル使用メモリ 99,536 KB
実行使用メモリ 22,716 KB
最終ジャッジ日時 2023-08-02 17:09:45
合計ジャッジ時間 10,194 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
20,620 KB
testcase_01 AC 55 ms
20,616 KB
testcase_02 AC 56 ms
20,544 KB
testcase_03 AC 56 ms
18,576 KB
testcase_04 AC 55 ms
20,668 KB
testcase_05 AC 54 ms
20,684 KB
testcase_06 AC 55 ms
20,676 KB
testcase_07 AC 54 ms
22,664 KB
testcase_08 AC 55 ms
20,812 KB
testcase_09 AC 55 ms
20,776 KB
testcase_10 AC 55 ms
20,676 KB
testcase_11 AC 55 ms
22,656 KB
testcase_12 AC 55 ms
20,728 KB
testcase_13 AC 54 ms
20,736 KB
testcase_14 AC 54 ms
20,560 KB
testcase_15 AC 55 ms
20,552 KB
testcase_16 AC 54 ms
20,572 KB
testcase_17 AC 55 ms
20,672 KB
testcase_18 AC 54 ms
22,676 KB
testcase_19 AC 54 ms
20,724 KB
testcase_20 AC 54 ms
20,716 KB
testcase_21 AC 55 ms
20,556 KB
testcase_22 AC 57 ms
18,496 KB
testcase_23 AC 54 ms
18,684 KB
testcase_24 AC 56 ms
20,604 KB
testcase_25 AC 55 ms
20,596 KB
testcase_26 AC 56 ms
22,600 KB
testcase_27 AC 54 ms
20,612 KB
testcase_28 AC 55 ms
22,716 KB
testcase_29 AC 55 ms
22,604 KB
testcase_30 AC 55 ms
20,612 KB
testcase_31 AC 56 ms
20,628 KB
testcase_32 AC 54 ms
22,712 KB
testcase_33 AC 55 ms
22,652 KB
testcase_34 AC 56 ms
20,612 KB
testcase_35 AC 200 ms
20,628 KB
testcase_36 AC 120 ms
20,728 KB
testcase_37 AC 131 ms
22,664 KB
testcase_38 AC 129 ms
20,628 KB
testcase_39 AC 118 ms
20,588 KB
testcase_40 AC 141 ms
20,768 KB
testcase_41 AC 189 ms
20,668 KB
testcase_42 AC 125 ms
20,672 KB
testcase_43 AC 105 ms
20,604 KB
testcase_44 AC 162 ms
20,720 KB
testcase_45 AC 168 ms
20,680 KB
testcase_46 AC 194 ms
20,804 KB
testcase_47 AC 79 ms
20,728 KB
testcase_48 AC 195 ms
22,648 KB
testcase_49 AC 171 ms
20,776 KB
testcase_50 AC 71 ms
20,672 KB
testcase_51 AC 108 ms
18,704 KB
testcase_52 AC 208 ms
20,796 KB
testcase_53 AC 204 ms
20,728 KB
testcase_54 AC 206 ms
20,760 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using static System.Console;
using static System.Math;

public class Hello{
    public static void Main(){
        int kazu = int.Parse(ReadLine());
        long[] hako = new long[10]{1,1,1,1,1,1,1,1,1,1};
        for(int i=1;i<kazu;i++){
            for(int j=1;j<9;j++){
                hako[j] = hako[j-1] + hako[j];
                hako[j]%=1000000007;
            }
            hako[9] += hako[8];
            hako[9] %= 1000000007;
        }

        long ans=0;
        for(int i=0;i<10;i++){
            ans+=hako[i];
//            WriteLine(hako[i]);
        }
        ans%=1000000007;
        WriteLine(ans);
    }
}
0