結果
| 問題 |
No.44 DPなすごろく
|
| ユーザー |
|
| 提出日時 | 2016-11-11 01:22:18 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 510 bytes |
| コンパイル時間 | 703 ms |
| コンパイル使用メモリ | 82,076 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-25 07:35:54 |
| 合計ジャッジ時間 | 1,552 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
//#include<bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
long long int x[100]={};
x[1]=1,x[2]=1;
for(int i=1;i<n;i++){
x[i+1]+=x[i];
x[i+2]+=x[i];
//cout<<x[0]<<x[1]<<x[2]<<endl;
}
cout<<x[n]<<endl;
return 0;
}