Submission #535697

#TimeUsernameProblemLanguageResultExecution timeMemory
535697pokmui9909다각형 (GA5_polygon)C++17
100 / 100
1 ms328 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ cin.tie(0) -> sync_with_stdio(false); ll L, R; cin >> L >> R; cout << (R <= 2 ? 2 : (R / 2) * (R / 2 + 1)) - (L - 1 <= 2 ? 2 : ((L - 1) / 2) * ((L - 1) / 2 + 1)); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...