답안 #5893

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
5893 2014-05-21T11:19:11 Z baneling100 다각형 (GA5_polygon) C++
100 / 100
0 ms 1088 KB
#include <stdio.h>

long long A, B, Ans;

int main(void)
{
    scanf("%lld %lld",&A,&B);
    if(B>=4)
    {
        Ans=(B/2)*(B/2+1)-((A-1)/2)*((A-1)/2+1);
        if(A<=2)
            Ans-=2;
    }
    printf("%lld",Ans);
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct