From 9e28e4c7b67c54229df11d355047ac8a88ea1817 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Sun, 15 Dec 2019 15:09:13 +0700 Subject: Normalize pathname --- coci/2006-2007/contest1/modulo.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 coci/2006-2007/contest1/modulo.c (limited to 'coci/2006-2007/contest1/modulo.c') diff --git a/coci/2006-2007/contest1/modulo.c b/coci/2006-2007/contest1/modulo.c new file mode 100644 index 0000000..14c0556 --- /dev/null +++ b/coci/2006-2007/contest1/modulo.c @@ -0,0 +1,21 @@ +#include + +int main() +{ + char i, mod[42] = {}; + short a; + + for (i = 0; i < 10; i++) { + scanf("%hd", &a); + mod[a % 42]++; + } + + a = 0; + for (i = 0; i < 42; i++) + if (mod[i]) + a++; + + printf("%hd\n", a); + + return 0; +} -- cgit 1.4.1