fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int a;
  8. cin >> a;
  9. for(int i = 0; i < a; i++){
  10. int temp; cin >> temp;
  11. if(temp == 1)cout << 0 << " " << 1 << endl;
  12. else if(temp == 2) cout << 0 << " " << 2 << endl;
  13. else if(temp == 3) cout << 0 << " " << 6 << endl;
  14. else if(temp == 4) cout << 2 << " " << 4 << endl;
  15. else if(temp == 5) cout << 2 << " " << 0 << endl;
  16. else if(temp == 6) cout << 2 << " " << 0 << endl;
  17. else if(temp == 7) cout << 4 << " " << 0 << endl;
  18. else if(temp == 8) cout << 2 << " " << 0 << endl;
  19. else if(temp == 9) cout << 8 << " " << 0 << endl;
  20. else cout << 0 << " " << 0 << endl;
  21. }
  22. }
Success #stdin #stdout 0s 4536KB
stdin
2
1
4
stdout
0 1
2 4