Welcome To SDIBT ACM-ICPC Online Judge

VIRTUAL JUDGE Recent Contest F.A.Qs Discuss Home ProblemSet Status Ranklist 10 Contest LoginRegister Exam
2017 ACM 集训队预选排名~      报名入口
Problem 1865. -- 数列求和

数列求和

Time Limit: 1 Sec  Memory Limit: 4 MB
Submit: 1016  Solved: 669
[Submit][Status][Discuss]

Description

数列求和是一类常见的问题,本题有一定的代表性: 求s=a+aa+aaa+aaaa+……+aa…aa(n位); 其中a的值由键盘输入,位数n也由键盘输入;

Input

第一行输入a的值; 第二行输入位数n;

Output

输出对n个数完成求和运算后的结果; 比如a=3,n=6时,s=3+33+333+3333+33333+333333

Sample Input

3
6

Sample Output

370368

HINT

Source

[Submit][Status][Discuss]

HOME Back

한국어 中文 English
All Copyright Reserved 2008-2010 SDIBT TEAM
GPL2.0 2003-2010 HUSTOJ Project TEAM
Anything about the Problems, Please Contact Admin:admin