Submission #560179


Source Code Expand

#include <stdio.h>

int main()
{
	char S[102];
	int s[6] = {0}, i;
	
	gets(S);
	
	for(i = 0; S[i]; i++) {
		switch (S[i]) {
			case 'A':  s[0]++;   break;
			case 'B':  s[1]++;   break;
			case 'C':  s[2]++;   break;
			case 'D':  s[3]++;   break;
			case 'E':  s[4]++;   break;
			case 'F':  s[5]++;   break;
		}
	}
	
	printf("%d %d %d %d %d %d\n", s[0], s[1], s[2], s[3], s[4], s[5]);
	
	return 0;
}

Submission Info

Submission Time
Task B - 文字数カウント
User abcdefg
Language C (GCC 4.9.2)
Score 100
Code Size 426 Byte
Status AC
Exec Time 33 ms
Memory 1016 KiB

Compile Error

./Main.c: In function ‘main’:
./Main.c:8:2: warning: ignoring return value of ‘gets’, declared with attribute warn_unused_result [-Wunused-result]
  gets(S);
  ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 19
Set Name Test Cases
Sample example_0.txt, example_1.txt, example_2.txt
All allone_0.txt, allone_1.txt, example_0.txt, example_1.txt, example_2.txt, handmade_0.txt, handmade_1.txt, handmade_2.txt, maxrand_0.txt, maxrand_1.txt, maxrand_2.txt, random_0.txt, random_1.txt, random_2.txt, random_3.txt, random_4.txt, example_0.txt, example_1.txt, example_2.txt
Case Name Status Exec Time Memory
allone_0.txt AC 33 ms 980 KiB
allone_1.txt AC 29 ms 972 KiB
example_0.txt AC 27 ms 916 KiB
example_1.txt AC 28 ms 916 KiB
example_2.txt AC 27 ms 1012 KiB
handmade_0.txt AC 29 ms 964 KiB
handmade_1.txt AC 30 ms 912 KiB
handmade_2.txt AC 28 ms 872 KiB
maxrand_0.txt AC 27 ms 960 KiB
maxrand_1.txt AC 28 ms 916 KiB
maxrand_2.txt AC 27 ms 1016 KiB
random_0.txt AC 29 ms 964 KiB
random_1.txt AC 27 ms 1016 KiB
random_2.txt AC 28 ms 888 KiB
random_3.txt AC 29 ms 960 KiB
random_4.txt AC 27 ms 916 KiB