StoneHaos

311

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