Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: A Number from Yanghui Triangle
Description Yanghui Triangle, as known as Pascal’s Triangle, is a number triangle with numbers arranged in staggered row such that
Consider a decimal number p with sequentially consists of _{, r} < k for all 0 ≤ r ≤ n. Here are some examples:
The numerical value of p can be very large. Your task is to calculate Input The input consists of Output The output should contain Sample Input 3 0 2 7 2 2 12345 5 2 1000000 Sample Output 1 10201 100501 Hint Use faster I/O to deal with the large-size input. Source POJ Monthly--2006.09.29, Kim, Chan Min (kcm1700@POJ) |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator