-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathc방과후.c
61 lines (52 loc) · 1020 Bytes
/
c방과후.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include<stdlib.h>
int main() {
#if 0
int n;
int arr[100] = { 0, };
int cnt[10] = { 0, };
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}
for (int i = 0; i < n
; i++) {
for (int j = 0; j < 10; j++) {
if (arr[i] % 10 == j) cnt[j]++;
}
}
for (int i = 0; i < 10; i++) {
printf("%d ", cnt[i]);
}
#endif
#if 0
int count_num[10] = { 0, };
int input_count, input_tmp;
scanf("%d", &input_count);
for (int i = 0; i < input_count; i++) {
scanf("%d", &input_tmp);
count_num[input_tmp % 10]++;
}
for (int i = 0; i < 10; i++)
printf("%d ", count_num[i]);
#endif
#if 0
int temp;
int arr[100] = { 0, };
for (int i = 0; i < 100; i++) {
arr[i] = rand() % 99+1;
}
for (int i = 1; i < 100; i++) {
for (int j = 0; j < 100 - j; j++) {
if (arr[j] > arr[j + 1]) {
temp = arr[j];
arr[j + 1] = arr[j];
}
}
}
#endif
#if 1
#endif
return 0;
}