Submission #1674344


Source Code Expand

#include <iostream>
using namespace std;
int main(){
	int n,a,x=0,y=0,z=1,d;
	cin>>n;

	if(n<=2){
		a=0;
	} else if (n<=3){
		a=1;
	} else {
		for(int i=0;i<n-3;i++){
			d=x+y+z;
			
			x=y;
			y=z;
			z=d;
		}

		a=d
	}

	cout<<a/10007<<endl;
return 0;
}

Submission Info

Submission Time
Task B - トリボナッチ数列
User n_iil
Language C++14 (GCC 5.4.1)
Score 0
Code Size 279 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:21:2: error: expected ‘;’ before ‘}’ token
  }
  ^