Game of Pooks Solution
Codechef May Cook-Off 2022
Problem Code : POOK
Solution :
#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
ll t = 1;
cin >> t;
while (t--)
{
ll n;
cin >> n;
if (n <= 2)
{
cout << "1\n";
}
else if (n == 3)
{
cout << n - 1 << "\n";
}
else
{
cout << n << "\n";
}
}
}
Comments
Post a Comment