Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
RGB7211 - Тооны зэргийн хүрд |
a тооны n хүртэлх зэрэгтүүдийг жишээн дээрх хэлбэрээр хэвлэ.
Input
a, n натурал тоонууд нэг мөрөнд нэг зайгаар тусгаарлагдан өгөгдөнө. (a,n<10)
Output
Зэргийн хүрдийг хэвлэ.
Example
Input: 3 5 Output: 3^1=3
3^2=9
3^3=27
3^4=81
3^5=243
Нэмсэн: | Bataa |
Огноо: | 2011-06-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-05-10 04:50:08
#include <bits/stdc++.h> using namespace std; int main() { int a,n,c=1; scanf("%d%d",&a,&n); for(int i=1; i<=n; i++){ for(int b=0; b<i; b++){ c*=a; } printf("%d^%d=%d\n", a, i, c); c=1; } } |
|||||||||||||
2024-04-23 12:34:24
c++ bodood ogoocee |
|||||||||||||
2024-04-15 08:06:21
amia horlo sonin gcimn |
|||||||||||||
2024-04-15 08:04:41
go kys selfish mf |
|||||||||||||
2024-04-15 07:57:36
stfu |
|||||||||||||
2024-04-15 04:47:41
balls |
|||||||||||||
2024-04-15 04:46:37
|
|||||||||||||
2024-04-15 04:36:34
The FitnessGram™ Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly, but gets faster each minute after you hear this signal. [beep] A single lap should be completed each time you hear this sound. [ding] Remember to run in a straight line, and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark, get ready, start. |
|||||||||||||
2024-03-12 03:26:38
#include <stdio.h> int main() { int a,b,i,s=1; scanf("%d %d",&a,&b); for(i=1;i<=b;i++) { s=s*a; printf("%d^%d=%d\n",a,i,s); } return 0; } huulaarai 7_1 delgerdalai Last edit: 2024-03-12 03:27:14 |
|||||||||||||
2024-03-12 03:25:01
#include <iostream> #include <sstream> #include <string> #include <cstdlib> #include <cmath> using namespace std; // Headers string toString (double); int toInt (string); double toDouble (string); int main() { int a, n, i; cin >> a; cin >> n; for (i = 1; i <= n; i++) { cout << a; cout << "^"; cout << i; cout << "="; cout << pow(a, i) << endl; } return 0; } // The following implements type conversion functions. string toString (double value) { //int also stringstream temp; temp << value; return temp.str(); } int toInt (string text) { return atoi(text.c_str()); } double toDouble (string text) { return atof(text.c_str()); } |