結果
問題 | No.741 AscNumber(Easy) |
ユーザー |
|
提出日時 | 2018-10-06 18:34:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 631 ms / 2,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 732 ms |
コンパイル使用メモリ | 65,340 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 13:53:40 |
合計ジャッジ時間 | 10,230 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 55 |
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main() | ^~~~
ソースコード
#include<iostream> using namespace std; long ans=10,n,mod=1e9+7; int dp[9]; main() { cin>>n; for(int i=0;i<9;i++)dp[i]=1; for(int i=1;i<n;i++) { for(int j=9;j--;) { for(int k=0;k<j;k++)(dp[j]+=dp[k])%=mod; (ans+=dp[j])%=mod; } } cout<<ans<<endl; }