From 7206ecee7579a10dd347d06b397b3790e969f8f3 Mon Sep 17 00:00:00 2001 From: Raphael McSinyx Date: Sun, 1 Jan 2017 21:05:53 +0700 Subject: Add others/easy20160714 --- others/easy20160714/06.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 others/easy20160714/06.c (limited to 'others/easy20160714/06.c') diff --git a/others/easy20160714/06.c b/others/easy20160714/06.c new file mode 100644 index 0000000..079c1da --- /dev/null +++ b/others/easy20160714/06.c @@ -0,0 +1,24 @@ +#include + +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; +} -- cgit 1.4.1