KIDZEE1H - Digital Triangle

no tags 

Print numbers to form a shape of triangle using the specified numbers as shown in the sample output.

এমনভাবে সংখ্যা প্রিন্ট করতে হবে যেনো আউটপুট ত্রিভুজের মতো দেখায়। প্রদত্ত দু’টি সংখ্যার ভিত্তিতে আউটপুট প্রিন্ট করতে হবে।

Input

First line of input contains the number of test cases T (T <= 10), each of the next T lines contains two integers D (0 <= D <= 9) and H (1 <= H <= 20), where D is the digit which is to be used to draw the triangle, and H is the height of the triangle.

ইনপুট ফাইলের প্রথম লাইনে থাকবে টেস্ট কেসের সংখ্যা T (T<=10), পরবর্তী T সংখ্যক লাইনের প্রতিটিতে দুটি করে পূর্ণ সংখ্যা থাকবে, D (0 <= D <= 9) এবং H (1 <= H <= 20), যেখানে D হচ্ছে সেই অঙ্কটি যাকে ব্যবহার করে ত্রিভুজ তৈরি করা হবে এবং H হচ্ছে ত্রিভুজের উচ্চতা।

Output

For each input case, first print the case number starting from 1 as in “Case X:” in a single line, where X represents the case number. Then from the next line, start printing the output, the desired triangle as shown in sample output.

প্রতিটি কেসের জন্য প্রথম লাইনে কেস নম্বর প্রিন্ট করতে হবে যেখানে “Case X:” লেখা থাকবে, যেখানে X হচ্ছে 1 থেকে শুরু করে কেসের নম্বর। এর পরবর্তী লাইন থেকে নমুনা আউটপুটের মত করে ত্রিভুজ প্রিন্ট করতে হবে।

Example

Input:
2
1 4
3 5

Output:
Case 1:
1
11
111
1111
Case 2:
3
33
333
3333
33333


Added by:Shafaet
Date:2013-01-09
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:Own problem - Used for Junior Training