diff options
author | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2017-01-01 21:05:53 +0700 |
---|---|---|
committer | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2017-01-01 21:15:44 +0700 |
commit | 7206ecee7579a10dd347d06b397b3790e969f8f3 (patch) | |
tree | 0b7218b75d8dae913fd91c695e105fc6f2256479 /others/easy20160714/06.c | |
parent | c67182c04491f2cf8b67e78b68aebf32aea25470 (diff) | |
download | cp-7206ecee7579a10dd347d06b397b3790e969f8f3.tar.gz |
Add others/easy20160714
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; +} |