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>
int main()
{
int i,j,check=0,n,len,cnt=0;
char a[1000];
scanf("%s",a);
len=strlen(a);
for(i=0;i<len;i++)
{
if(i==0)
{
cnt+=10;
if(a[i]=='(') check=1;
else check=2;
}
else if(check==1)
{
if(a[i]=='(') cnt+=5;
else
{
check=2;
cnt+=10;
}
}
else if(check==2)
{
if(a[i]==')') cnt+=5;
else
{
check=1;
cnt+=10;
}
}
}
printf("%d",cnt);
return 0;
}
# | 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... |