Time Exceeded
Code
#include <bits/stdc++.h>
using namespace std;
int slv_by_payel(int n)
{
int n1 = n - 1;
int strt = 1,pair = 0;
while(strt < n1)
{
pair++;
n1--;
strt++;
}
return pair;
}
int main()
{
int tc;
cin>>tc;
while(tc--)
{
int n;
cin>>n;
int reslt = slv_by_payel(n);
cout<<reslt<<endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1073 Pair Sum
- Contest
- Bangladesh 2.0
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-08-16 17:14:33
- Judged At
- 2024-11-11 03:12:14
- Judged By
- Score
- 70
- Total Time
- ≥1096ms
- Peak Memory
- ≥844.0 KiB