Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //929
- #include <cstdio>
- int main(void) {
- FILE* fin = fopen("input.txt", "r");
- FILE* fout = fopen("output.txt", "w");
- int n, k;
- fscanf(fin, "%d%d", &n, &k);
- fclose(fin);
- int out = (n + k - 1) % 5;
- if (out == 0) out = 5;
- fprintf(fout, "%d\n", out);
- fclose(fout);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement