Submission #65731925


Source Code Expand

Copy
#include <stdio.h>
int main(void) {
int N, i;
if (scanf("%d", &N) != 1) return 1;
for (i = 1; i <= N; i++) {
int out = 0, j;
for (j = 2; j <= 6; j++) {
if (i % j == 0) out |= 1 << j;
}
if (out == 0) {
printf("%d\n", i);
} else {
for (j = 2; j <= 6; j++) {
if ((out >> j) & 1) putchar("--abcde"[j]);
}
putchar('\n');
}
}
return 0;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include <stdio.h>

int main(void) {
	int N, i;
	if (scanf("%d", &N) != 1) return 1;
	for (i = 1; i <= N; i++) {
		int out = 0, j;
		for (j = 2; j <= 6; j++) {
			if (i % j == 0) out |= 1 << j;
		}
		if (out == 0) {
			printf("%d\n", i);
		} else {
			for (j = 2; j <= 6; j++) {
				if ((out >> j) & 1) putchar("--abcde"[j]);
			}
			putchar('\n');
		}
	}
	return 0;
}

Submission Info

Submission Time
Task E - スーパーFizzBuzz
User mikecat
Language C (gcc 12.2.0)
Score 300
Code Size 390 Byte
Status AC
Exec Time 0 ms
Memory 1740 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 1
AC × 15
Set Name Test Cases
Sample example01.txt
All example01.txt, subtask_01_01.txt, subtask_01_02.txt, subtask_01_03.txt, subtask_01_04.txt, subtask_01_05.txt, subtask_01_06.txt, subtask_01_07.txt, subtask_01_08.txt, subtask_01_09.txt, subtask_01_10.txt, subtask_01_11.txt, subtask_01_12.txt, subtask_01_13.txt, subtask_01_14.txt
Case Name Status Exec Time Memory
example01.txt AC 0 ms 1616 KB
subtask_01_01.txt AC 0 ms 1620 KB
subtask_01_02.txt AC 0 ms 1708 KB
subtask_01_03.txt AC 0 ms 1736 KB
subtask_01_04.txt AC 0 ms 1712 KB
subtask_01_05.txt AC 0 ms 1600 KB
subtask_01_06.txt AC 0 ms 1688 KB
subtask_01_07.txt AC 0 ms 1624 KB
subtask_01_08.txt AC 0 ms 1688 KB
subtask_01_09.txt AC 0 ms 1740 KB
subtask_01_10.txt AC 0 ms 1720 KB
subtask_01_11.txt AC 0 ms 1644 KB
subtask_01_12.txt AC 0 ms 1712 KB
subtask_01_13.txt AC 0 ms 1572 KB
subtask_01_14.txt AC 0 ms 1720 KB


2025-05-12 (Mon)
14:36:42 +09:00