Tính tổng S = ~x~ + ~\frac{x^2}{1+2}~ +...+ ~\frac{x^n}{1+2+...+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~ + ~\frac{x^2}{1+2}~ + ~\frac{x^3}{1+2+3}~ + … + ~\frac{x^n}{1+2+3+...+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~

Lưu ý: Giá trị ~S~ chỉ làm tròn còn 2 số thập phân

Input

3

Output

1.50

Comments

Please read the guidelines before commenting.



  • 0
    HuanHoaHoe  commented on April 30, 2023, 2:08 p.m.

    input de bai xam cu


  • 0
    ngohuytin007  commented on Aug. 29, 2022, 7:29 a.m.

    Input có vấn đề đk ạ?


    • 0
      maingocnhat  commented on Sept. 26, 2022, 7:07 a.m.

      tự sinh test ik :))))