Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- int k;
- cin>>k;
- /*
- do
- {
- cin.clear();
- cin.sync();
- cin>>k;
- } while (cin.fail() || k<=0 || k>30);
- */
- for (int j=0; j<k; j++)
- {
- cin>>n;
- /*
- do
- {
- cin.clear();
- cin.sync();
- cin>>n;
- } while (cin.fail() || n<=0);
- */
- switch (n)
- {
- case 1:
- {
- cout<<0<<" "<<1;
- break;
- }
- case 2:
- {
- cout<<0<<" "<<2;
- break;
- }
- case 3:
- {
- cout<<0<<" "<<6;
- break;
- }
- case 4:
- {
- cout<<2<<" "<<4;
- break;
- }
- case 5:
- {
- cout<<2<<" "<<0;
- break;
- }
- case 6:
- {
- cout<<2<<" "<<0;
- break;
- }
- case 7:
- {
- cout<<4<<" "<<0;
- break;
- }
- case 8:
- {
- cout<<2<<" "<<0;
- break;
- }
- case 9:
- {
- cout<<8<<" "<<0;
- break;
- }
- default:
- {
- cout<<0<<" "<<0;
- break;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement