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 len, height;
char s[52];
void input(void)
{
scanf("%s",&s[1]);
len=strlen(&s[1]);
}
void process(void)
{
int i;
for(i=1 ; i<=len ; i++)
{
if(s[i]==s[i-1])
height+=5;
else
height+=10;
}
}
void output(void)
{
printf("%d",height);
}
int main(void)
{
input();
process();
output();
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... |