Akash and Function Solution
Codechef March Long Challenge 2022 - I
Problem Code : CHFDBT
Solution :
#include <bits/stdc++.h>
#define ll long long int
#define ull unsigned long long int
using namespace std;
void solve()
{
ll n;
cin >> n;
if (n % 2 == 0)
{
cout << n / 2 << "\n";
}
else
{
cout << (n / 2) + 1 << "\n";
}
}
int main()
{
ll t;
cin >> t;
while (t--)
{
solve();
}
}
Comments
Post a Comment