Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
RGB7610 - Дараалан 1 ороогүй |
0, 1 цифрүүдээс бүтэх N урттай тоон дараалал дахь 1 цифр дараалан ороогүй байх дарааллын тоог ол. 0 цифрээр эхэлж болно.
Input
Натурал тоо n өгөгдөнө. n<50.
Output
Дараалан 1 цифр ороогүй n урттай дарааллын тоо.
Example
Input: 5 Output: 13
Нэмсэн: | Bataa |
Огноо: | 2013-02-13 |
Хугацааны хязгаарлалт: | 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
|
|||||
2023-12-06 10:01:15
8 urttai bvl hedden bolomj baih ve? |
|||||
2023-04-07 14:58:16
#include <iostream>//DO YOU LIKE PORNO using namespace std;//DO YOU LIKE PORNO int main() {//DO YOU LIKE PORNO long long n;//DO YOU LIKE PORNO cin>>n;//DO YOU LIKE PORNO long long a[n];//DO YOU LIKE PORNO a[1]=2;//DO YOU LIKE PORNO//DO YOU LIKE PORNO a[2]=3;//DO YOU LIKE PORNO for(long long i=3;i<=n;i++)//DO YOU LIKE PORNO a[i]=a[i-1]+a[i-2];//DO YOU LIKE PORNO cout<<a[n];//DO YOU LIKE PORNO }//DO YOU LIKE PORNO |
|||||
2022-11-27 07:53:51
#include <iostream>//205 AKUMU using namespace std; int main() { long long n; cin>>n; long long a[n]; a[1]=2; a[2]=3; for(long long i=3;i<=n;i++) a[i]=a[i-1]+a[i-2]; cout<<a[n];//205 AKUMU } |
|||||
2021-01-19 15:01:01
#include <cstdio> #include <cmath> #include <iostream> using namespace std; int main(){ long long a; cin >> a; if(a == 1){ cout << 2 << endl; } else if(a == 2){ cout << 3 << endl; } else{ long long b[a+1]; b[1] = 2; b[2] = 3; for(long long i=3; i < a+1; i++){ b[i] = b[i-2] + b[i-1]; } cout << b[a] << endl; } } Oilgoj huulaarai :))) Last edit: 2021-01-19 15:02:06 |
|||||
2020-04-01 17:20:58
#include<bits/stdc++.h> using namespace std; int main(){ long long n,i,k,l; cin>>n; if(n==1){ cout<<"2"<<endl; return 0; } if(n==2){ cout<<"3"<<endl; return 0; } l=2; k=3; for(i=3; i<=n; i++){ k=k+l; l=l+(i-2); } cout<<k<<endl; return 0; } |
|||||
2019-12-24 12:22:14
plz |
|||||
2019-12-24 12:21:43
bodood uguuch |
|||||
2019-12-14 05:28:33
x 4rrrrrrr r r rr r r r r r r r r r r r r r r r r r r rr r r r rr r r r r r r r rr r rr3err uhuhouihj[0p8op29wiurepeo iuheoij o uhkjgniuydddddddddddddd gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggtdxy fbh gh hb h h h h h h h h h h h h h h h h h h h h g gg h h hg h g |
|||||
2019-11-20 12:13:51
bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod |
|||||
2019-11-20 12:13:24
bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod bod |