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 <iostream>
#include <cstdio>
using namespace std;
char q[51],prev,next;
int sum;
int main()
{
int i;
scanf("%s",q);
sum=10;
i=0;
while(q[i+1]!=0)
{
prev=q[i];
next=q[i+1];
if(prev==next)sum+=5;
else sum+=10;
i++;
}
printf("%d",sum);
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... |