F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Pty loves lines

Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)
Total Submission(s): 1183    Accepted Submission(s): 289


Problem Description
You are required to put n straight lines on a plane, guaranteeing no three lines share a common point and no lines are coincident. They will form some intersections, please output all possible numbers of intersections.
 

Input
The first line, an integer T(1 ≤ T ≤ 5) - the number of test cases.

Following T lines, an positive integer n(1 ≤ n ≤ 700) - the number of lines.
 

Output
Several lines, each line several numbers separated by a blank space - all possible numbers of intersections.
 

Sample Input
2 3 5
 

Sample Output
0 2 3 0 4 6 7 8 9 10
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-19 19:36:08, Gzip enabled