SHARE
TWEET

SPOL - Dwie liczby silni

warmi12 Sep 24th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "iostream"
  2. using namespace std;
  3.  
  4. int main(){
  5.  
  6. int ile,n;
  7. cin>>ile;
  8. for(int i=0;i<ile;i++)
  9. {
  10.     cin>>n;
  11.     switch(n){
  12.         case 0:
  13.         case 1:
  14.             cout<<"0 1"<<endl;
  15.             break;
  16.         case 2:
  17.             cout<<"0 2"<<endl;
  18.             break;
  19.         case 3:
  20.             cout<<"0 6"<<endl;
  21.             break;
  22.         case 4:
  23.             cout<<"2 4"<<endl;
  24.             break;
  25.         case 5:
  26.         case 6:
  27.         case 8:
  28.             cout<<"2 0"<<endl;
  29.             break;
  30.         case 7:
  31.             cout<<"4 0"<<endl;
  32.             break;
  33.         case 9:
  34.             cout<<"8 0"<<endl;
  35.             break;
  36.         default:
  37.             cout<<"0 0"<<endl;
  38.             break;
  39.     }
  40.    
  41. }
  42.    
  43.  
  44.  
  45. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top