Submission #523671


Source Code Expand

Copy
#include <stdio.h>
#include <string.h>

int main()
{
  char buf[101];
  char *p;
  char l[]="Left";
  char r[]="Right";
  char a[]="Atcoder";
  
  
  gets(buf);
  p = strtok(buf," ");
  if(strcmp(p,l)==0){
    printf("<");
  }else if(strcmp(p,r)==0){
    printf(">");
  }else{
    printf("A");
  }
  while(p!=NULL){
    p = strtok(NULL, " ");
    if(p!=NULL){
      if(strcmp(p,l)==0){
        printf(" <");
      }else if(strcmp(p,r)==0){
        printf(" >");
      }else{
        printf(" A");
      }
    }
  }
  printf("\n");
  
  return 0;
}

Submission Info

Submission Time
Task A - スペース高橋君
User inari
Language C (GCC 4.9.2)
Score 100
Code Size 583 Byte
Status
Exec Time 25 ms
Memory 804 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:13:3: warning: ignoring return value of ‘gets’, declared with attribute warn_unused_result [-Wunused-result]
   gets(buf);
   ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
× 3
× 14
Set Name Test Cases
Sample example_0.txt, example_1.txt, example_2.txt
All 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 24 ms 700 KB
corner_1.txt 24 ms 708 KB
corner_2.txt 24 ms 792 KB
example_0.txt 25 ms 796 KB
example_1.txt 24 ms 796 KB
example_2.txt 25 ms 676 KB
maxrand_0.txt 24 ms 792 KB
maxrand_1.txt 23 ms 800 KB
maxrand_2.txt 23 ms 800 KB
random_0.txt 24 ms 804 KB
random_1.txt 24 ms 716 KB
random_2.txt 24 ms 800 KB
random_3.txt 24 ms 708 KB
random_4.txt 24 ms 804 KB