Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests [2]
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
数列的和
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB
Total submit users: 111, Accepted users: 106
Problem 10127 : No special judgement
Problem description
  求数列a,aa,aaa,aaaa,……的和:a+aa+aaa+...+aa….a(n个a),n为1~9之间的整数,a为0~9之间的整数。

Input
  输入两个数,第一个为n (1≤n≤9),第二个数为a (0≤a≤9)。可以输入多组这样的整数,输入时以n=0为程序结束。

Output
  针对以上的每一组整数,将对应输出一个整数,表示数列的和。

Sample Input
3 2
5 3
5 1
6 0
0 9
Sample Output
246
37035
12345
0 
Judge Tips
  由题意可知本题的关键就是从第2项开始,每一项的值就是其前1项的值乘以10再加上输入的a值。

Problem Source
  Teacher llj

Submit   Discuss   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:7336 today,12401411 total, since 2010-05-07