Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7312 - Тооны факториал

Өгөгдсөн тоо ямар нэгэн тооны факториал бол тэр тоог хэвлэ. Үгүй бол No гэж хэвлэ.

Input

Бүхэл тоо өгөгдөнө.

Output

Өгөгдсөн тоо ямар нэгэн тооны факториал бол тэр тоог үгүй бол No.

Example

Input 1:
24

Output 1:
4
Input 2:
10
Output 2:
No
Input 2:
1 Output 2: 1


Нэмсэн:Bataa
Огноо:2013-01-11
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2019-12-03 07:52:56
iim amarhan bodlogo haana bsiin
2019-11-17 14:10:44
#include <iostream>
using namespace std;

long long buba(int n) {
long long s = 1;
for(int i = 1; i <= n; i++) {
s *= i;
}
return s;
}

int main() {

long long n, s = 0;
cin >> n;

for(int i = 1; true; i++) {
if(buba(i) > n) {
cout << "NO";
break;
}
if(buba(i) == n) {
cout << i;
break;
}
}

return 0;
}



buruu hariult gene uu !!?!?!?!?
2019-11-01 08:45:01
this shit is still shit
2019-10-21 11:12:35
gandi=amraq
2019-10-21 11:10:58
uuuuuuru bod btsana

Last edit: 2019-10-21 11:12:01
2019-10-15 18:54:20
#include<stdio.h>

int a,b=1,c,fact=1,d,f,g,h,i;
int main(){

scanf("%d",&a);


for(i=1;i<=a;i++){

fact=fact*i;
if(fact==a){

printf("%d",i);
break;}}

if(fact!=a)


printf("No");

return 0;
}



2019-10-12 07:56:11
if uc callmesenarieuiiii









oh you not a crazydskagc v


hjfhnsrcjh
2019-10-12 07:44:38
hu lalala
oh you not a crazy
oh you not a crazy
oooohh
2019-10-12 07:43:30
true lalalala
true lalalala
senorita
2019-10-12 05:32:07
:(((((((((((((((((((
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.