#include <stdio.h>
char S[55]; int ans;
int main()
{
int i;
scanf ("%s",S+1);
for (i=1;S[i];i++){
if (S[i] != S[i-1]) ans += 10;
else ans += 5;
}
printf ("%d",ans);
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
884 KB |
Output is correct |
2 |
Correct |
0 ms |
884 KB |
Output is correct |
3 |
Correct |
0 ms |
884 KB |
Output is correct |
4 |
Correct |
0 ms |
884 KB |
Output is correct |
5 |
Correct |
0 ms |
884 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
884 KB |
Output is correct |
2 |
Correct |
0 ms |
884 KB |
Output is correct |
3 |
Correct |
0 ms |
884 KB |
Output is correct |
4 |
Correct |
0 ms |
884 KB |
Output is correct |
5 |
Correct |
0 ms |
884 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
884 KB |
Output is correct |
2 |
Correct |
0 ms |
884 KB |
Output is correct |
3 |
Correct |
0 ms |
884 KB |
Output is correct |
4 |
Correct |
0 ms |
884 KB |
Output is correct |
5 |
Correct |
0 ms |
884 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
884 KB |
Output is correct |
2 |
Correct |
0 ms |
884 KB |
Output is correct |
3 |
Correct |
0 ms |
884 KB |
Output is correct |
4 |
Correct |
0 ms |
884 KB |
Output is correct |
5 |
Correct |
0 ms |
884 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
884 KB |
Output is correct |
2 |
Correct |
0 ms |
884 KB |
Output is correct |
3 |
Correct |
0 ms |
884 KB |
Output is correct |
4 |
Correct |
0 ms |
884 KB |
Output is correct |
5 |
Correct |
0 ms |
884 KB |
Output is correct |