All Submissions


An isosceles triangle is a triangle with (at least) two equal sides.
How many isosceles triangle are possible when you are allowed to choose side length from (1,2,3....N).

Input:
Input will contain many test cases(<=10). Each on a new line.
Each Test case will give value of N<=10^8

Output:
Print number of isosceles triangle possible.

Sample Input:
1
2
3
4
5

Sample Output:
1
3
7
12
19

Explanation: For N=2, triangles possible are (1,1,1) ,(2,2,1) (2,2,2)

Jayant Mukherji


Languages: Brain,C,C++,Java,C#,JavaScript,Pascal,Perl,PHP,Python,Ruby,Text

Time Limit: 1 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0