summaryrefslogtreecommitdiffstats
path: root/mat/advent/6/prog.c
blob: 14eb68aef9116eeeae5a4262215ee6be3f3ff510 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char ** argv) {
	double x;
	size_t s = 0;
	for (double a = 1; a <= 2020; a++) {
		x = ((float)7/(float)5)*(float)a;
		if (x == (int)x)
			s++;
	}
	fprintf(stderr, "%lu\n", s);
	return 0;
}