#T616. 计算奇数和
计算奇数和
Description
Calculate the sum of all odd numbers less than the input integer. For example, if the input is 8, the output should be the sum of 1 + 3 + 5 + 7; if the input is 7, the output should be the sum of 1 + 3 + 5.
Input Format
A single line containing a positive integer N.
Output Format
Output the sum of all odd numbers less than the positive integer N.
8
16
7
9
源码
CodesOnline