#include<iostream> using namespace std; int main() { int i, j, k; for (i = 1;i <= 20;i++) { for (j = 1;j <= 33;j++) { k = 100 - i - j; if (k % 3 == 0 && i * 5 + j * 3 + k / 3 == 100) { cout << i << " " << j << " " << k << endl; } } } return 0; }