diff options
Diffstat (limited to 'others/easy20160714/06.c')
-rw-r--r-- | others/easy20160714/06.c | 24 |
1 files changed, 24 insertions, 0 deletions
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 <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; +} |