Submission #19578

# Submission time Handle Problem Language Result Execution time Memory
19578 2016-02-24T20:06:59 Z thebarbershop scanf 함수 5 (BSC_0_7) C++
100 / 100
0 ms 1084 KB
#include <cstdio>

int main() {
    int a, b;
    scanf("%d%d", &a, &b);
    double av = (a+b)/2.0;
    if(av == (int)av)
        printf("%d", (int)av);
    else
        printf("%.1lf", av);
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1084 KB Output is correct
2 Correct 0 ms 1084 KB Output is correct
3 Correct 0 ms 1084 KB Output is correct
4 Correct 0 ms 1084 KB Output is correct
5 Correct 0 ms 1084 KB Output is correct
6 Correct 0 ms 1084 KB Output is correct
7 Correct 0 ms 1084 KB Output is correct
8 Correct 0 ms 1084 KB Output is correct
9 Correct 0 ms 1084 KB Output is correct
10 Correct 0 ms 1084 KB Output is correct