fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int T, n;
  7. cin >> T;
  8. for (int i = 1; i <= T; i++) {
  9. cin >> n;
  10. if (n > 10) {
  11. cout << n - 10 << " " << n - (n - 10) << "\n";
  12. }
  13. else {
  14. cout << 0 << " " << n << "\n";
  15. }
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0s 3300KB
stdin
20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
stdout
0 1
0 2
0 3
0 4
0 5
0 6
0 7
0 8
0 9
0 10
1 10
2 10
3 10
4 10
5 10
6 10
7 10
8 10
9 10
10 10