Submission #916232


Source Code Expand

#include <iostream> 
#include <string> 
#include <vector> 
#include <cmath> 
#include <algorithm> 
#include <cstdlib> 
#include <ctime> 
#include <cstdio> 
#include <functional> 
#include <set> 
#include <sstream> 
#include <cctype>
#include <stack>
#include <queue>
#include <cstring>
#include <map>
#include <list>
#include <cassert>
 
using namespace std; 

const long long INF=1LL<<50LL;
const double PI=3.14159265358979323846264;
const long long mod=1000000000LL+7LL;

long long gcd(long long x,long long y){
	return y==0 ? x : gcd(y,x%y);
}

int main(){

	string s="CODEFESTIVAL2016";

	string t;
	cin>>t;

	int res=0;
	for(int i=0;i<n;i++) res+=s[i]!=t[i];
	cout<<res<<endl;

}

Submission Info

Submission Time
Task A - Signboard
User lay20114
Language C++14 (GCC 5.4.1)
Score 0
Code Size 726 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:38:16: error: ‘n’ was not declared in this scope
  for(int i=0;i<n;i++) res+=s[i]!=t[i];
                ^