답안 #1109

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1109 2013-06-25T11:00:11 Z skstmdvlf 그릇 (KOI13_bowl) C++
16 / 16
0 ms 884 KB
#include<stdio.h>
#include<string.h>
int main()
{
    char a[51];
    int i, hap=0, len;
    
    scanf("%s",a);
    
    len=strlen(a);
    
    if(len!=0) hap=10; //대회해서 했던대로 하겠다!
    
    for(i=1;i<len;i++)
    {
        if(a[i]==a[i-1]) hap=hap+5;
        else hap=hap+10;
    }
    
    printf("%d",hap);
    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