blob: a9c5e32e993efd528a855364278833b0184ae1d4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import java.util.Scanner;
class Problem1
{
public static void main(String... args)
{
var scanner = new Scanner(System.in);
int n = scanner.nextInt();
for (int i = 1; i <= n; i += 2)
System.out.println(i);
if (n % 2 == 0)
n--;
System.out.println((n + 1) * (n + 1) / 4);
}
}
|