about summary refs log tree commit diff
path: root/others/easy20160714/06.c
blob: 079c1dae7c856f60f329f28adb0a303e3d8e94ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>

int main()
{
	FILE *f = fopen("INP.TXT", "r");
	unsigned long long x, y, k, i;

	fscanf(f, "%lld %lld %lld", &x, &y, &k);

	fclose(f);

	i = y / (x * 6 + k) * 6;

	while (i * x + (i + 5) / 6 * k < y)
		i++;

	f = fopen("OUT.TXT", "w");

	fprintf(f, "%lld\n", i);

	fclose(f);

	return 0;
}