Submission #3411256
Source Code Expand
#include<stdio.h> int main(void) { char s[10]; char t[10]; int cntS = 0; int cntT = 0; scanf("%s", s); scanf("%s", t); 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]) { } else { 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 (s[i] == t[i]) { } else { cntT++; } } if (cntS != 0 || cntT != 0) { printf("You will lose\n"); } else if(cntS == 0 && cntT == 0) { printf("You can win\n"); } printf("\n"); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder社の給料 |
User | vx2oa |
Language | C (GCC 5.4.1) |
Score | 0 |
Code Size | 769 Byte |
Status | CE |
Compile Error
./Main.c: In function ‘main’: ./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’ ./Main.c:40:3: error: stray ‘\343’ in program printf("\n"); ^ ./Main.c:40:3: error: stray ‘\200’ in program ./Main.c:40:3: error: stray ‘\200’ in program ./Main.c:9:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s", s); ^ ./Main.c:10:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s", t); ^