Problem Solution

1 solutions

  • 0
    @ 2024-03-29 11:58:47

    Author Code (Kamonasish Roy) :

    #include<bits/stdc++.h>
    using namespace std;
    const long long M=2e5+10,MOD=2000000007;
    typedef long long ll;
    int main()
    {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t=1;
    cin>>t;
    while(t--){
    int n;
    cin>>n;
    cout<<(n+1)/2<<"\n";
    }
    return 0;
    }

    Tester Code (Jahirul Islam Hridoy) :

    void solve()
    {
    int n ; cin >> n ;
    cout << (n + 1) / 2 << "\n" ;
    }
    int main()
    {
    Heart
    int t ; cin >> t ; while(t--) solve() ;
    }

  • 1

Information

ID
1041
Difficulty
8
Category
Beginners Click to Show
Tags
(None)
# Submissions
10
Accepted
7
Accepted Ratio
70%
Uploaded By