結果
問題 | No.741 AscNumber(Easy) |
ユーザー |
![]() |
提出日時 | 2018-10-05 22:13:07 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 176 ms / 2,000 ms |
コード長 | 641 bytes |
コンパイル時間 | 3,866 ms |
コンパイル使用メモリ | 103,040 KB |
実行使用メモリ | 17,920 KB |
最終ジャッジ日時 | 2024-10-12 13:12:29 |
合計ジャッジ時間 | 5,933 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 55 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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); } }