Submission #1162878


Source Code Expand

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;
 
#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define REP(i,n) FOR(i,0,n)

//最大公約数
long gcd(long a, long b){
	if (a%b==0){
		return b;
	}
	else{
		return gcd(b,a%b);
	}
}

//最小公倍数
long lcm(long a, long b){
	return (a*b) / gcd(a,b);
}

typedef long long ll;

char str[17];

int main(){
	char s[] = {"CODEFESTIVAL2016"};
	
	gets(str);
	
	int cnt = 0;
	
	REP(i,16){
		if (str[i] != s[i]) cnt++;
	}
	
	cout << cnt << endl;
	
	return 0;
}

Submission Info

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

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:35:10: error: ‘gets’ was not declared in this scope
  gets(str);
          ^