JDCC '15 Contest 3 P1 - Countdown

View as PDF

Submit solution


Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

On New Year's Eve, a popular tradition is to have a countdown to midnight. Starting at some number N, people count down from N to 0 and then burst into celebration. Your task is to write a program that simulates this countdown.

Input Specification

The first line of input provides the number of test cases, T (1 \le T \le 100). T test cases follow. Each test case consists of one integer N (1 \le N \le 100).

Output Specification

For each test case, your program should output one line containing the countdown, which consists of N+1 space-separated integers ending with an exclamation point.

Sample Input

2
3
5

Sample Output

3 2 1 0!
5 4 3 2 1 0!

Comments

There are no comments at the moment.