SHARE
TWEET

tiganie si manele

a guest Oct 15th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <fstream>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main (){
  6.     ifstream Gigi("patrate3.in");
  7.     ofstream Marcel("patrate3.out");
  8.     int c,k,i;
  9.     long long m;
  10.     Gigi>>c>>m;
  11.     i=2;
  12.     if (c==1){
  13.         k=m*8;
  14.         Marcel<<k;
  15.         return 0;
  16.     }
  17.     else {
  18.         while (m>i*i){
  19.             i++;
  20.         }
  21.         k=(i-1)/2;
  22.         if ((m==i*i)||((i-1)%2!=0)){
  23.             k++;
  24.         }
  25.         Marcel <<k;
  26.     }
  27.     return 0;
  28. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top