시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 1 1 1 100.000%

문제

상근이는 금고 대여 사업을 시작했다. 금고가 모여있는 곳은 이차원 평면, 금고는 평면위의 한 점으로 생각할 수 있다. 상근이는 금고를 총 L*(A+1+B)개 가지고 있고, 금고는 (1, -A), (L, B)를 꼭지점으로 하는 직사각형 안의 정수 좌표에 해당한다.

금고는 두 명의 경비원이 지키고 있다. 한 경비원은 (0, -A)에, 다른 경비원은 (0, B)에 서있다. 경비원은 금고와 경비원을 연결하는 선분 사이에 금고가 하나도 없다면 그 금고를 볼 수 있다.

두 경비원이 모두 보지 못하는 금고는 안전하지 않은 금고이고, 한 명만 볼 수 있는 금고는 안전한 금고이다. 마지막으로, 두 경비원이 모두 볼 수 있는 금고는 매우 안전한 금고이다.

A, B, L이 주어졌을 때, 안전하지 않은 금고, 안전한 금고, 매우 안전한 금고의 수를 세는 프로그램을 작성하시오.

입력

첫째 줄에 A와 B가, 둘째 줄에 L이 주어진다. (1 ≤ A, B ≤ 2000, 1 ≤ L ≤ 1,000,000,000)

출력

첫째 줄에 안전하지 않은 금고의 수, 둘째 줄에 안전한 금고의 수, 셋째 줄에 매우 안전한 금고의 수를 출력한다.

예제 입력 1

1 1
3

예제 출력 1

2
2
5

힌트

W3sicHJvYmxlbV9pZCI6IjI5NTEiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWFlMDhcdWFjZTAgXHVjMGFjXHVjNWM1IiwiZGVzY3JpcHRpb24iOiI8cD5cclxuXHRcdWMwYzFcdWFkZmNcdWM3NzRcdWIyOTQgXHVhZTA4XHVhY2UwIFx1YjMwMFx1YzVlYyBcdWMwYWNcdWM1YzVcdWM3NDQgXHVjMmRjXHVjNzkxXHVkNTg4XHViMmU0LiBcdWFlMDhcdWFjZTBcdWFjMDAgXHViYWE4XHVjNWVjXHVjNzg4XHViMjk0IFx1YWNmM1x1Yzc0MCBcdWM3NzRcdWNjMjhcdWM2ZDAgXHVk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