Submission #524455


Source Code Expand

Copy
#include<stdio.h>
#include<string.h>
main(){
  char s[100];
  int i;
  for(i=0;i<100;i++){
  scanf("%s",&s[i]);
    if(s[i]=='L'){
      printf("<",s[i]);
    }else{
      if(s[i]=='R'){
        printf(">",s[i]);
      }else{
        if(s[i]=='A'){
          printf("A",s[i]);
        }
      }
    }
  }
  printf("\n",s[100]);

  return 0;
}

Submission Info

Submission Time
Task A - スペース高橋君
User ky33
Language C (GCC 4.9.2)
Score 0
Code Size 364 Byte
Status
Exec Time 24 ms
Memory 800 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:9:7: warning: too many arguments for format [-Wformat-extra-args]
       printf("<",s[i]);
       ^
./Main.c:12:9: warning: too many arguments for format [-Wformat-extra-args]
         printf(">",s[i]);
         ^
./Main.c:15:11: warning: too many arguments for format [-Wformat-extra-args]
           printf("A",s[i]);
           ^
./Main.c:20:3: warning: too many arguments for format [-Wformat-extra-args]
   printf("\n",s[100]);
   ^
./Main.c:7:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s",&s[i]);
   ^

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 example_0.txt, example_1.txt, example_2.txt
All 0 / 100 corner_0.txt, corner_1.txt, corner_2.txt, example_0.txt, example_1.txt, example_2.txt, maxrand_0.txt, maxrand_1.txt, maxrand_2.txt, random_0.txt, random_1.txt, random_2.txt, random_3.txt, random_4.txt
Case Name Status Exec Time Memory
corner_0.txt 22 ms 792 KB
corner_1.txt 23 ms 708 KB
corner_2.txt 24 ms 680 KB
example_0.txt 23 ms 792 KB
example_1.txt 23 ms 800 KB
example_2.txt 24 ms 708 KB
maxrand_0.txt 22 ms 700 KB
maxrand_1.txt 21 ms 796 KB
maxrand_2.txt 21 ms 708 KB
random_0.txt 21 ms 708 KB
random_1.txt 23 ms 652 KB
random_2.txt 21 ms 704 KB
random_3.txt 21 ms 800 KB
random_4.txt 23 ms 792 KB