This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
#include<string.h>
char str[300000];
int palindrome(int size)
{
int i, j;
int ok=1;
for(i=size;;i++)
{
ok=1;
for(j=0;j<size;j++)
{
if((i-j-1)<size && str[j]!=str[i-j-1] )
{
printf("%d번째 : %c %c\n",i, str[j], str[i-j-1]);
ok=0;
break;
}
}
if(ok) return i;
}
}
int main()
{
int str_length=0;
char a='0';
while(a!='\n'&&str_length<50)
{
scanf("%c", &a);
str[str_length] = a;
str_length++;
}
printf("%d", palindrome(str_length-1));
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |