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.|

RGB7212 - Факториалын хүрд

Өгөгдсөн тоо хүртэлх натурал тоонуудын факториалыг жишээн дээрх форматаар хэвлэ.

Input

Натурал тоо өгөгдөнө.

Output

Өгөгдсөн тоо хүртэлх натурал тоонуудын факториалыг нэг нэг мөрөнд жишээн дээрхтэй ижлээр хэвлэнэ. 

Example

Input:
4

Output:
1!=1
2!=2
3!=6
4!=24

Нэмсэн:Bataa
Огноо:2013-01-21
Хугацааны хязгаарлалт: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
2024-03-03 06:27:10
#include <iostream>
using namespace std;
int main()
{
long long n,i,b,s;
cin>>n;
long long a[n];
s = 1;
for(i=1;i<=n;i++)
{
s = s*i;
}
a[n] = s;
for(i=n-1;i>=1;i--)
{
a[i]=a[i+1]/(i+1);
}
for(i=1;i<=n;i++)
{
cout<<i<<"!="<<a[i]<<"\n";
}
}
what is up my duudes

Last edit: 2024-03-03 06:27:43
2024-02-22 09:16:18
#include<bits/stdc++.h>
using namespace std;

int fact(int x){
if(x==1){
return 1;
}
else{
return x*fact(x-1);
}
}

main(){
int n;
scanf("%d",&n);
for(int i=1;i<=n;i++){
printf("%d!=%d\n", i, fact(i));
}
} using recursion function
2024-02-19 07:31:27
#include<bits/stdc++.h>
using namespace std;
int main(){
long i, n, s=1;
cin>>n;
for(i=1; i<=n; i++){
s=s*i;
cout<<i<<"!"<<"="<<s<<endl;
}
}
2024-02-19 07:31:25
#include<bits/stdc++.h>
using namespace std;
int main(){
long i, n, s=1;
cin>>n;
for(i=1; i<=n; i++){
s=s*i;
cout<<i<<"!"<<"="<<s<<endl;
}
}
2024-02-19 07:30:23
#include<bits/stdc++.h>
using namespace std;
int main(){
long i, n, s=1;
cin>>n;
for(i=1; i<=n; i++){
s=s*i;
cout<<i<<"!"<<"="<<s<<endl;
}
}

2024-01-24 14:48:50
#include<iostream>
using namespace std;
int main()
{int a,b,s=1,k;
cin>>a;
for(b=1;b<=a;b++){ s=s*b; cout<<b<<"!"<<"="<<s<<endl;
}}
// copy if you gay from : schneizel//
2024-01-02 10:14:10
import java.util.Scanner;

public class Think {
public static void main(String[] args) throws java.lang.Exception {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int result = 1;
int i = 1;
while (i <= a) {
result = result * i;
System.out.println(i + "!" + "=" + result);
i++;
}

}
}
2023-12-18 08:12:24
We're no strangers to love
You know the rules and so do I (do I)
A full commitment's what I'm thinking of
You wouldn't get this from any other guy
I just wanna tell you how I'm feeling
Gotta make you understand
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
We've known each other for so long
Your heart's been aching, but you're too shy to say it (say it)
Inside, we both know what's been going on (going on)
We know the game and we're gonna play it
And if you ask me how I'm feeling
Don't tell me you're too blind to see
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
We've known each other for so long
Your heart's been aching, but you're too shy to say it (to say it)
Inside, we both know what's been going on (going on)
We know the game and we're gonna play it
I just wanna tell you how I'm feeling
Gotta make you understand
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
2023-12-18 08:12:18
We're no strangers to love
You know the rules and so do I (do I)
A full commitment's what I'm thinking of
You wouldn't get this from any other guy
I just wanna tell you how I'm feeling
Gotta make you understand
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
We've known each other for so long
Your heart's been aching, but you're too shy to say it (say it)
Inside, we both know what's been going on (going on)
We know the game and we're gonna play it
And if you ask me how I'm feeling
Don't tell me you're too blind to see
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
We've known each other for so long
Your heart's been aching, but you're too shy to say it (to say it)
Inside, we both know what's been going on (going on)
We know the game and we're gonna play it
I just wanna tell you how I'm feeling
Gotta make you understand
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
2023-12-18 08:12:07
We're no strangers to love
You know the rules and so do I (do I)
A full commitment's what I'm thinking of
You wouldn't get this from any other guy
I just wanna tell you how I'm feeling
Gotta make you understand
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
We've known each other for so long
Your heart's been aching, but you're too shy to say it (say it)
Inside, we both know what's been going on (going on)
We know the game and we're gonna play it
And if you ask me how I'm feeling
Don't tell me you're too blind to see
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
We've known each other for so long
Your heart's been aching, but you're too shy to say it (to say it)
Inside, we both know what's been going on (going on)
We know the game and we're gonna play it
I just wanna tell you how I'm feeling
Gotta make you understand
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.