Submission #1294442
Source Code Expand
#include <stdio.h> int main(void) { char c[2]; char s[] = "ABCDE"; int i; scanf("%s", c); for(i=0; i<5; i++){ if(s[i] == c[0]){ printf("%d\n", i + 1); } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - A |
User | masao718 |
Language | C (GCC 5.4.1) |
Score | 100 |
Code Size | 241 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 128 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:8:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s", c); ^
Judge Result
Set Name | all | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
all | A.txt, B.txt, C.txt, D.txt, E.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
A.txt | AC | 1 ms | 128 KB |
B.txt | AC | 1 ms | 128 KB |
C.txt | AC | 1 ms | 128 KB |
D.txt | AC | 1 ms | 128 KB |
E.txt | AC | 1 ms | 128 KB |