Submission #7878

# Submission time Handle Problem Language Result Execution time Memory
7878 2014-08-22T10:46:36 Z comet 다각형 (GA5_polygon) C++
0 / 100
0 ms 1672 KB
#include<iostream>
int main(){
  int a,b;
  std::cin>>a>>b;
  if(a%2)a++;
  if(b%2)b--;
  if(a<4)a=4;
  if(b<4)std::cout<<"0";
  else if(a==b)std::cout<<a;
  else std::cout<<(a+b)*(b-a+2)/2;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1672 KB Output is correct
2 Correct 0 ms 1672 KB Output is correct
3 Correct 0 ms 1672 KB Output is correct
4 Incorrect 0 ms 1672 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -