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

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
2022-09-17 05:26:53
#include <iostream>
using namespace std;
int main() {
int a, b, n, c=1;
cin>>a>>n;
for(b=1; b<=n; b++){
c=c*a;
cout<<a<<"^"<<b<<"="<<c<<endl;
}
return 0;
}
heheh
2022-07-18 09:41:44
int a,b,f=1;
Scanner in = new Scanner(System.in);
a = in.nextInt();
b = in.nextInt();
for(int i=1; i<=b; i++) {
f = f * a;
System.out.println(a + "^" + i + "=" + f);
}
2022-06-23 12:06:07
hi









































































































































































































































































mas gosog zais

Last edit: 2022-06-23 12:06:56
2022-06-05 08:44:33
#include <iostream>
using namespace std;

int main() {

// your code here
int a, b, n, c=1;
cin>>a>>n;
for(b=1; b<=n; b++){
c=c*a;
cout<<a<<"^"<<b<<"="<<c<<endl;
}
return 0;
} khandmaa to tusa shutej amidarnuu
2022-05-20 04:04:29
t1 bugusnuud
2022-04-05 07:28:30
hi llruda
2022-03-24 16:08:28
#include<stdio.h>
#include<math.h>
int main()
{
int a,b,c,d;
scanf("%d%d",&a,&b);
for(c=1; c<=b; c++)
{
d=pow(a,c);
printf("%d^%d=%d\n ",a,c,d);
}
return 0;
}
2022-03-24 13:49:47
#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;
}

copydd suguud hahahah
2021-11-30 10:51:58
#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 n, a, i, s, j;

cin >> a;
cin >> n;
for (i = 1; i <= n; i++) {
s = 1;
for (j = 1; j <= i; j++) {
s = s * a;
}
cout << a << "*" << i << "=" << s << 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());
}
2021-11-30 10:51:58
#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 n, a, i, s, j;

cin >> a;
cin >> n;
for (i = 1; i <= n; i++) {
s = 1;
for (j = 1; j <= i; j++) {
s = s * a;
}
cout << a << "*" << i << "=" << s << 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());
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.