Submission
Id | When | Author | Problem | Language | CPU | Memory | Verdict |
---|---|---|---|---|---|---|---|
4414 | 2022-03-23 16:07:15 | M_Hasan | Sum Game II | C++ 17 | 3 ms | 3444 kb | Accepted |
Test Cases
CPU | Memory | Verdict | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 2 ms | 3444 kb | Accepted | ||||||||
2 | 3 ms | 3332 kb | Accepted | ||||||||
3 | 2 ms | 3388 kb | Accepted | ||||||||
4 | 2 ms | 3356 kb | Accepted | ||||||||
5 | 3 ms | 3348 kb | Accepted | ||||||||
6 | 2 ms | 3332 kb | Accepted | ||||||||
7 | 2 ms | 3392 kb | Accepted | ||||||||
Source Code
program.cpp
#include<bits/stdc++.h> #define ll long long int #define pb push_back #define show(x) cout<<#x<<" : "<<x<<endl; #define vec vector<int> #define rall(x) x.rbegin(), x.rend() #define all(x) x.begin(), x.end() using namespace std; void Solve(){ ll n; cin>>n; cout<<(n*(n-1))/2<<endl; } int main(){ int t = 1 ; cin>>t; while(t--)Solve(); }