| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1341691 | inimad | Trol (COCI19_trol) | C++20 | 0 ms | 344 KiB |
#include<bits/stdc++.h>
using namespace std;
#define LL long long
int main() {
ios::sync_with_stdio(0), cin.tie(0);
int q;
cin >> q;
while(q--){
int l, r;
cin >> l >> r;
l--;
cout << (r * (r + 1)) / 2 - (l * (l+1)) / 2 <<'\n';
}
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
