SHARE
TWEET

E-Olymp: P_62 (Unsolved)

MuradHacci Feb 21st, 2020 (edited) 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * File:   main.cpp
  3.  * Author: MURAD HAJIYEV
  4.  * Problem: https://www.e-olymp.com/az/problems/62
  5.  * Created on February 21, 2020, 11:32 PM
  6.  */
  7.  
  8. #include <bits/stdc++.h>
  9. using namespace std;
  10.  
  11. int main(int argc, char** argv) {
  12.    
  13.     unsigned long long int faktorial;
  14.    
  15.     cin >> faktorial;
  16.    
  17.     if(faktorial == 1){
  18.         cout << 0;
  19.         return 0;
  20.     }
  21.    
  22.     int i = 2;
  23.    
  24.     while(faktorial != 1){
  25.         faktorial /= i;
  26.         i++;
  27.     }
  28.    
  29.     cout << i-1;
  30.  
  31.     return 0;
  32. }
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