SOJ. Output the Yanghui Triangel

Source: Internet
Author: User

Output the Yanghui Triangel
Total number of submissions: 225 By Quantity: 59
Time limit: 1 seconds Memory limit: 256 MB topic description

Write program to output the Yanghui Triangel of N*n, where n was an input. The Yanghui Triangel is defined as

1

1 1

1 2 1

1 3 3 1

1 4 6) 4 1

1 5 10 10 5 1

..........................

Input format

Each lines of the input is a integer that denotes the dimension of the Yanghui Triangel that would be outputted to the S Creen.

An input 0 denotes the end of the input.

Output format

Each value of the output was followed by a TAB, which include the last value of a line.

Sample input Copy sample input to Clipboard
5670
Sample output
11112113311464111112113311464115101051111121133114641151010511615201561


the tab in the title indicates the tab \ t, which was not noticed at first. The two-digit output and the one-digit output were also badly dug.


SOJ. Output the Yanghui Triangel

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.