import java.util.Scanner;
public class scanf5 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int sum = a + b;
if (sum % 2 == 0)
System.out.println((a + b) / 2);
else
System.out.println((a + b) * 0.5);
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
123 ms |
13688 KB |
Output is correct |
2 |
Correct |
123 ms |
13360 KB |
Output is correct |
3 |
Correct |
126 ms |
13696 KB |
Output is correct |
4 |
Correct |
127 ms |
13936 KB |
Output is correct |
5 |
Correct |
124 ms |
13264 KB |
Output is correct |
6 |
Correct |
128 ms |
13976 KB |
Output is correct |
7 |
Correct |
133 ms |
13804 KB |
Output is correct |
8 |
Correct |
128 ms |
13892 KB |
Output is correct |
9 |
Correct |
132 ms |
13956 KB |
Output is correct |
10 |
Correct |
125 ms |
13332 KB |
Output is correct |