Submission #795883

# Submission time Handle Problem Language Result Execution time Memory
795883 2023-07-27T20:06:59 Z rainboy 그릇 (KOI13_bowl) C
16 / 16
1 ms 300 KB
#include <stdio.h>
#include <string.h>

#define N	50

int main() {
	static char cc[N + 1];
	int n, i, ans;

	scanf("%s", cc), n = strlen(cc);
	ans = 10;
	for (i = 1; i < n; i++)
		ans += cc[i] == cc[i - 1] ? 5 : 10;
	printf("%d\n", ans);
	return 0;
}

Compilation message

aa.c: In function 'main':
aa.c:10:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |  scanf("%s", cc), n = strlen(cc);
      |  ^~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 220 KB Output is correct
2 Correct 0 ms 292 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 220 KB Output is correct
3 Correct 0 ms 292 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
3 Correct 0 ms 220 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 224 KB Output is correct
2 Correct 0 ms 228 KB Output is correct
3 Correct 0 ms 220 KB Output is correct
4 Correct 0 ms 220 KB Output is correct
5 Correct 1 ms 224 KB Output is correct