# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
90120 | 2018-12-20T12:01:54 Z | cs71107 | 다각형 (GA5_polygon) | C++14 | 2 ms | 808 KB |
#include <bits/stdc++.h> #define MOD 1000000007 using namespace std; typedef long long int ll; typedef pair<int,int> pii; typedef pair<int, pii> piii; const int INF = 1e9+1; const int MAXN = 1e5+10; int main() { ll a,b; scanf("%lld%lld",&a,&b); if(b<=3)return !puts("0"); if(a<=2)a = 4; b = b/2; a = (a+1)/2-1; ll sum = b*(b+1)-a*(a+1); printf("%lld",sum); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 504 KB | Output is correct |
2 | Correct | 2 ms | 548 KB | Output is correct |
3 | Correct | 2 ms | 616 KB | Output is correct |
4 | Correct | 2 ms | 616 KB | Output is correct |
5 | Correct | 2 ms | 808 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 808 KB | Output is correct |
2 | Correct | 2 ms | 808 KB | Output is correct |
3 | Correct | 2 ms | 808 KB | Output is correct |
4 | Correct | 2 ms | 808 KB | Output is correct |
5 | Correct | 2 ms | 808 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 808 KB | Output is correct |
2 | Correct | 2 ms | 808 KB | Output is correct |
3 | Correct | 2 ms | 808 KB | Output is correct |
4 | Correct | 2 ms | 808 KB | Output is correct |
5 | Correct | 2 ms | 808 KB | Output is correct |