StoneHaos

921

Nov 2nd, 2019
144
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //921
  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 a, b;
  9.     fscanf(fin, "%d%d", &a, &b);
  10.     fclose(fin);
  11.     if (a > 0 || a < 0 && b % 2 == 0)
  12.         fprintf(fout, "1\n");
  13.     else if (a == 0)
  14.         fprintf(fout, "0\n");
  15.     else
  16.         fprintf(fout, "-1\n");
  17.     fclose(fout);
  18.     return 0;
  19. }
RAW Paste Data