/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Accepted 2ms 492.0 KiB
#3 Accepted 112ms 864.0 KiB
#4 Accepted 121ms 1.586 MiB

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-08-16 17:14:33
Judged By
Score
100
Total Time
121ms
Peak Memory
1.586 MiB