Submission #1403815
Source Code Expand
#include <stdio.h> #include <string.h> int main(void){ int i,n,l; char p[64],q[64],r[64]; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%s%s%s",p,q,r); l=strlen(r); if(p[0] == 'B'){printf("%c",r[0]);} if(p[0] == 'M'){printf("%c",r[l/2]);} if(p[0] == 'E'){printf("%c",r[l-1]);} } printf("\n"); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - エンド・オブ・ビギニング |
User | physics0523 |
Language | C (GCC 5.4.1) |
Score | 100 |
Code Size | 385 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 128 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:7:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ^ ./Main.c:9:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s%s%s",p,q,r); ^
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | 00_sample_00.txt, 00_sample_01.txt, 10_min_00.txt, 10_min_01.txt, 10_min_02.txt, 20_max_00.txt, 20_max_01.txt, 20_max_02.txt, 90_random_00.txt, 90_random_01.txt, 90_random_02.txt, 90_random_03.txt, 90_random_04.txt, 90_random_05.txt, 90_random_06.txt, 90_random_07.txt, 90_random_08.txt, 90_random_09.txt, 99_medium_00.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 1 ms | 128 KB |
00_sample_01.txt | AC | 1 ms | 128 KB |
10_min_00.txt | AC | 1 ms | 128 KB |
10_min_01.txt | AC | 1 ms | 128 KB |
10_min_02.txt | AC | 1 ms | 128 KB |
20_max_00.txt | AC | 1 ms | 128 KB |
20_max_01.txt | AC | 1 ms | 128 KB |
20_max_02.txt | AC | 1 ms | 128 KB |
90_random_00.txt | AC | 1 ms | 128 KB |
90_random_01.txt | AC | 1 ms | 128 KB |
90_random_02.txt | AC | 1 ms | 128 KB |
90_random_03.txt | AC | 1 ms | 128 KB |
90_random_04.txt | AC | 1 ms | 128 KB |
90_random_05.txt | AC | 1 ms | 128 KB |
90_random_06.txt | AC | 1 ms | 128 KB |
90_random_07.txt | AC | 1 ms | 128 KB |
90_random_08.txt | AC | 1 ms | 128 KB |
90_random_09.txt | AC | 1 ms | 128 KB |
99_medium_00.txt | AC | 1 ms | 128 KB |