Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n;
  8. int k;
  9. cin>>k;
  10. /*
  11. do
  12. {
  13. cin.clear();
  14. cin.sync();
  15. cin>>k;
  16. } while (cin.fail() || k<=0 || k>30);
  17. */
  18. for (int j=0; j<k; j++)
  19. {
  20. cin>>n;
  21. /*
  22. do
  23. {
  24. cin.clear();
  25. cin.sync();
  26. cin>>n;
  27. } while (cin.fail() || n<=0);
  28. */
  29.  
  30. switch (n)
  31. {
  32. case 1:
  33. {
  34. cout<<0<<" "<<1;
  35. break;
  36. }
  37. case 2:
  38. {
  39. cout<<0<<" "<<2;
  40. break;
  41. }
  42. case 3:
  43. {
  44. cout<<0<<" "<<6;
  45. break;
  46. }
  47. case 4:
  48. {
  49. cout<<2<<" "<<4;
  50. break;
  51. }
  52. case 5:
  53. {
  54. cout<<2<<" "<<0;
  55. break;
  56. }
  57. case 6:
  58. {
  59. cout<<2<<" "<<0;
  60. break;
  61. }
  62. case 7:
  63. {
  64. cout<<4<<" "<<0;
  65. break;
  66. }
  67. case 8:
  68. {
  69. cout<<2<<" "<<0;
  70. break;
  71. }
  72. case 9:
  73. {
  74. cout<<8<<" "<<0;
  75. break;
  76. }
  77. default:
  78. {
  79. cout<<0<<" "<<0;
  80. break;
  81. }
  82. }
  83.  
  84. }
  85. return 0;
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement