Tính tổng S = ~x~ + ~x^2~ + ... + ~x^n~
View as PDF
Submit solution
Points:
100.00
Time limit:
1.0s
Memory limit:
100M
Input:
stdin
Output:
stdout
Author:
Problem type
Allowed languages
C, C++, GAS64, Pascal, Perl, PHP, Python, Sed, TCL, Text
Tính ~S(x,n)~ = ~x~ + ~x^2~ + ~x^3~ + ... + ~x^n~. Với ~x~, ~n~ là số nguyên dương cho trước.
- Đầu vào là 2 số ~x~ ~n~
- Đầu ra là kết quả ~S~
Input
2 4
Output
30
Comments
[Bài này áp dụng công thức là ra thôi:)) Link công thức: file:///C:/Users/Maxsys/Videos/z7259452830380_cf3409dfe697e7b028b5c0dbe5fba6bb.jpg