답안 #1687

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1687 2013-07-12T08:32:52 Z gs13105 그릇 (KOI13_bowl) C++
16 / 16
0 ms 884 KB
#include <stdio.h>
#include <string.h>

char arr[51];

int main()
{
	char p;
	int r=10,len,i;
	scanf("%s",&arr);
	len=strlen(arr);
	p=arr[0];
	for(i=1;i<len;i++)
	{
		if(arr[i]==p)
			r+=5;
		else
		{
			p=arr[i];
			r+=10;
		}
	}
	printf("%d",r);
	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