Submission #1407074


Source Code Expand

Copy
#include <stdio.h>
#include <string.h>
int main(){
  char s[300];
  int len,max,i;
  scanf("%s",s);
  len = strlen(s);
  for(max=len/2;max>0;max--){
    for(i=0;i<max;i++){
      if(s[i]!=s[max+i])break;
    }
    if(i==max){
      printf("%d\n",max);
      break;
    }
  }
  return 0;
}

Submission Info

Submission Time
Task B - ss
User mayumini
Language C (GCC 5.4.1)
Score 0
Code Size 305 Byte
Status
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:6:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s",s);
   ^

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample1.txt, sample2.txt, sample3.txt, sample4.txt
All 0 / 200 mn.txt, mx_50_1_0.txt, rnd_22_1_0.txt, rnd_22_1_11.txt, rnd_22_1_7.txt, rnd_6_8_2.txt, rnd_7_1_0.txt, rnd_7_1_5.txt, rnd_7_1_6.txt, rndmx_50_1_0.txt, sample1.txt, sample2.txt, sample3.txt, sample4.txt
Case Name Status Exec Time Memory
mn.txt 1 ms 128 KB
mx_50_1_0.txt 1 ms 128 KB
rnd_22_1_0.txt 1 ms 128 KB
rnd_22_1_11.txt 1 ms 128 KB
rnd_22_1_7.txt 1 ms 128 KB
rnd_6_8_2.txt 1 ms 128 KB
rnd_7_1_0.txt 1 ms 128 KB
rnd_7_1_5.txt 1 ms 128 KB
rnd_7_1_6.txt 1 ms 128 KB
rndmx_50_1_0.txt 1 ms 128 KB
sample1.txt 1 ms 128 KB
sample2.txt 1 ms 128 KB
sample3.txt 1 ms 128 KB
sample4.txt 1 ms 128 KB