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-10-03 13:23:22
- Judged By
- Score
- 70
- Total Time
- ≥1095ms
- Peak Memory
- ≥1.023 MiB