Advertisement
kdzhr

Untitled

Jan 13th, 2020
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. // OK A region second tour 15/16 https://informatics.mccme.ru/mod/statements/view.php?id=18806#
  2.  
  3. # include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8.     int32_t n;
  9.     cin >> n;
  10.     if (n % 3 == 0) {
  11.         cout << n / 3 - 1 << ' ' << n / 3 << ' ' << n / 3 + 1;
  12.     } else if (n % 3 == 1) {
  13.         cout << n / 3 -  1 << ' ' << n / 3 << ' ' << n / 3 + 2;
  14.     } else {
  15.         cout << n / 3 - 1 << ' ' << n / 3 + 1 << ' ' << n / 3 + 2;
  16.     }
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement