Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. /*
  2. // Sample code to perform I/O:
  3.  
  4. cin >> name;                            // Reading input from STDIN
  5. cout << "Hi, " << name << ".\n";        // Writing output to STDOUT
  6.  
  7. // Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
  8. */
  9.  
  10. // Write your code here
  11. #include <iostream>
  12. using namespace std;
  13. int main()
  14. {
  15.     int N;
  16.     cin>>N;
  17.     int i=1;
  18.     while(N>=0)
  19.     {
  20.     if((N-2*i)<=0)
  21.     {
  22.         cout<<"Motu"<<endl;
  23.         break;
  24.     }
  25.     if((N-i)<=0)
  26.     {
  27.         cout<<"Patlu"<<endl;
  28.     }
  29.     else
  30.     i++;
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement