Hdoj (HDU) 2500 to do a righteous hang electric people (water ~)

Source: Internet
Author: User

Problem Description
To have a healthy life, Hangzhou electric students should be so. For example, our exams today should be "good faith" as the top.
The first topic of each exam is always very simple, today is no exception, the subject is required to output a specified size of the "HDU" string, in particular, in order to reflect the "upright" word, we require the output of the string is also a square (the number of rows and the number of columns equal).

Input
The first line of the input contains a positive integer n (n<=20), representing a total of n sets of data, followed by n rows of data, each row containing a positive integer m (m<=50), indicating that a row has M "HDU" connected to each other.

Output
Outputs a square string of the specified size, in the output format, see Sample Data.

Sample Input
2
1
2

Sample Output
HDU
HDU
HDU
Hduhdu
Hduhdu
Hduhdu
Hduhdu
Hduhdu
Hduhdu

Water problem, this does not have to explain it ~ ~ ~

Import Java.util.Scanner; Public classmain{ Public Static void Main(string[] args) {Scanner SC =NewScanner (System.inch);intT =sc.nextint (); while(Sc.hasnext ()) {intn =sc.nextint (); for(intI=1; i<=3*n;i++) { for(intj=1; j<=n;j++) {System. out. Print ("HDU"); } System. out. println (); }        }    }}

Hdoj (HDU) 2500 to do a righteous hang electric people (water ~)

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.