Docoding OJ
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
Login
Register
1051: C++语言 Sn=a+aa+aaa+…+aa…aaa
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:242
Solved:91
Submit
Submit Record
Statistics
ShowOff!
Description
求Sn=a+aa+aaa+…+aa…aaa(有n个a)之值,其中a是一个数字 ,等于2。 例如:2+22+222+2222+22222(n=5),n由键盘输入。
Input
n (1<=n<=10)
Output
和
Sample Input
Copy
5
Sample Output
Copy
24690
Source/Category
c++
基础
入门
循环
黄金
Submit
Submit Record
Statistics
ShowOff!