Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
RGB7402 - Давхар давталт 2 |
Өгөгдсөн бүхэл тоон тусламжтайгаар дараах тоон хэлбэрийг үүсгэ.
Input
Бүхэл тоо өгөгдөнө. 10-аас бага.
Output
Өгөгдсөн тоог ашиглан жишээн дээрх тоон хэлбэрийг үүсгэ.
Example
Input: 5
Output: 1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Нэмсэн: | Bataa |
Огноо: | 2013-01-14 |
Хугацааны хязгаарлалт: | 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-04-09 05:07:53
enig oilgohgu baival zueree bi c gsn oilgohgu bn hamtdaa huultsgaaay homies |
||||||
2023-04-09 05:07:49
enig oilgohgu baival zueree bi c gsn oilgohgu bn hamtdaa huultsgaaay homies |
||||||
2023-02-15 17:19:39
hinoru bna #include<bits/stdc++.h> using namespace std; int main() { long long int n,j; cin>>n; for(int i=1;i<=n;i++) { for( j=1;j<=i;j++) cout<<j<<" "; cout<<"\n"; } return 0; } |
||||||
2023-02-07 06:02:32
lalar uud gang2 |
||||||
2022-11-29 11:08:55
#include <bits/stdc++.h> using namespace std; int main() { int n,i,j; cin>>n; if(n<=10) for(i=1; i<=n; i++){ for(j=1; j<=i; j ++){ cout<<j<<" "; } cout<<endl; } } this is for your mom by chimedragchaa |
||||||
2022-11-29 11:08:46
#include <bits/stdc++.h> using namespace std; int main() { int n,i,j; cin>>n; if(n<=10) for(i=1; i<=n; i++){ for(j=1; j<=i; j ++){ cout<<j<<" "; } cout<<endl; } } this is for your mom by chimedragchaa |
||||||
2022-11-29 11:08:43
#include <bits/stdc++.h> using namespace std; int main() { int n,i,j; cin>>n; if(n<=10) for(i=1; i<=n; i++){ for(j=1; j<=i; j ++){ cout<<j<<" "; } cout<<endl; } } this is for your mom by chimedragchaa |
||||||
2022-02-05 10:52:44
#include<bits/stdc++.h> using namespace std; int main(){ int a; cin >>a; if(a==1)cout<<a; else if(a==2){ cout<<1<<endl; cout<<1<<" "<<2; } else if(a==3){ cout<<1<<endl; cout<<1<<" "<<2<<endl; cout<<1<<" "<<2<<" "<<3<<endl; } else if(a==4){ cout<<1<<endl; cout<<1<<" "<<2<<endl; cout<<1<<" "<<2<<" "<<3<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<endl; } else if(a==5){ cout<<1<<endl; cout<<1<<" "<<2<<endl; cout<<1<<" "<<2<<" "<<3<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<endl; } else if(a==6){ cout<<1<<endl; cout<<1<<" "<<2<<endl; cout<<1<<" "<<2<<" "<<3<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<" "<<6<<endl; } else if(a==7){ cout<<1<<endl; cout<<1<<" "<<2<<endl; cout<<1<<" "<<2<<" "<<3<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<" "<<6<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<" "<<6<<" "<<7<<endl; } else if(a==8){ cout<<1<<endl; cout<<1<<" "<<2<<endl; cout<<1<<" "<<2<<" "<<3<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<" "<<6<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<" "<<6<<" "<<7<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<" "<<6<<" "<<7<<" "<<8<<endl; } else if(a==9){ cout<<1<<endl; cout<<1<<" "<<2<<endl; cout<<1<<" "<<2<<" "<<3<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<" "<<6<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<" "<<6<<" "<<7<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<" "<<6<<" "<<7<<" "<<8<<endl; cout<<1<<" "<<2<<" "<<3<<" "<<4<<" "<<5<<" "<<6<<" "<<7<<" "<<8<<" "<<9<<endl; } return 0; } |
||||||
2022-01-07 16:00:27
#include<stdio.h> int main() { int a,b,c; scanf("%d",&a); for(b=1 ;b<=a ;b++) { for(c=1; c<=b ; c++) printf("%d ",c); printf("\n"); } } pls copy this |
||||||
2021-06-19 16:21:30
chadku bgaa bol bagshaasaa asu!!! |