StoneHaos

929

Nov 2nd, 2019
158
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //929
  2. #include <cstdio>
  3.  
  4. int main(void) {
  5.     FILE* fin = fopen("input.txt", "r");
  6.     FILE* fout = fopen("output.txt", "w");
  7.  
  8.     int n, k;
  9.     fscanf(fin, "%d%d", &n, &k);
  10.     fclose(fin);
  11.     int out = (n + k - 1) % 5;
  12.     if (out == 0) out = 5;
  13.     fprintf(fout, "%d\n", out);
  14.     fclose(fout);
  15.     return 0;
  16. }
RAW Paste Data