close


Submit solution

Points: 0.10 (partial)
Time limit: 1.5s
Memory limit: 64M
Input: stdin
Output: stdout

Authors:
Problem type
Mô tả vấn đề

Viết chương trình nhập số nguyên n và số thực x. Tính ~x^n~

Input

Một dòng duy nhất gồm một nguyên n và số thực x.

Output

In ra ~x^n~, làm tròn 3 chữ số thập phân

Sample Input 1
2 3.5
Sample Output 1
12.250

Comments

Please read the guidelines before commenting.



  • 0
    Image
    Image teo  commented on April 15, 2026, 1:27 a.m.

    include <bits/stdc++.h>

    using namespace std;

    int main() {

     float x;
     int k;
     cin >> k >> x;
     cout << fixed << setprecision(3);
     float result = 1.0;
     for (int i=0;i&lt;k;i++)
     {
         result = result * x;
     }
     cout << result;
    
    
    return 0;
    

    }