Submission #3411862


Source Code Expand

#include<stdio.h>
int main(void)
{
	char s[11];
	char t[11];
	int cntS = 0;
	int cntT = 0;

	scanf_s("%s", s, 11);
	scanf_s("%s", t, 11);

	int sNumber = strlen(s);

	for (int i = 0; i <= sNumber; i++) {
		if (s[i] == '@' || s[i] == 'a' || s[i] == 't' || s[i] == 'c' || s[i] == 'o' || s[i] == 'd' || s[i] == 'e' || s[i] == 'r') {
		}
		else if (s[i] == t[i]) {
		}
		if(s[i] != t[i] && t[i] == '@' && t[i] == 'a' && t[i] == 't' && t[i] == 'c' && t[i] == 'o' && t[i] == 'd' && t[i] == 'e' && t[i] == 'r') {
			cntS++;
		}

		if (t[i] == '@' || t[i] == 'a' || t[i] == 't' || t[i] == 'c' || t[i] == 'o' || t[i] == 'd' || t[i] == 'e' || t[i] == 'r') {
		}
		else if (t[i] == s[i]) {
		}
		if (s[i] != t[i] && t[i] == '@' && t[i] == 'a' && t[i] == 't' && t[i] == 'c' && t[i] == 'o' && t[i] == 'd' && t[i] == 'e' && t[i] == 'r') {
			cntT++;
		}

	}

	if (cntS != 0 || cntT != 0) {
		printf("You will lose\n");
	}
	else if (cntS == 0 && cntT == 0)
	{
		printf("You can win\n");
	}
	return 0;
}

Submission Info

Submission Time
Task B - AtCoderトランプ
User vx2oa
Language C (GCC 5.4.1)
Score 0
Code Size 1027 Byte
Status CE

Compile Error

./Main.c: In function ‘main’:
./Main.c:9:2: warning: implicit declaration of function ‘scanf_s’ [-Wimplicit-function-declaration]
  scanf_s("%s", s, 11);
  ^
./Main.c:12:16: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
  int sNumber = strlen(s);
                ^
./Main.c:12:16: warning: incompatible implicit declaration of built-in function ‘strlen’
./Main.c:12:16: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
/tmp/ccpzvLIG.o: In function `main':
Main.c:(.text.startup+0x22): undefined reference to `scanf_s'
Main.c:(.text.startup+0x38): undefined reference to `scanf_s'
collect2: error: ld returned 1 exit status