Skip to content

Commit

Permalink
Create 608_Minimum_Car_required.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
rajvikash18113 committed Nov 6, 2024
1 parent f8019f1 commit d476923
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions 500 to 1000 difficulty rating/608_Minimum_Car_required.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// https://www.codechef.com/practice/course/logical-problems/DIFF800/problems/MINCARS
#include <bits/stdc++.h>
using namespace std;

int main() {
// your code goes here
int t;
cin >> t;
while(t--)
{
int n;
cin >> n;
if(n % 4 == 0)
{
cout << n / 4 << endl;
}
else
{
cout << (n/4) + 1 << endl;
}
}

}

0 comments on commit d476923

Please sign in to comment.