My issue
My code
#include<iostream>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--){
int n;
cin>>n;
cout<<n/6<<endl;
}
return 0;
}
Problem Link: CHFCLASS Problem - CodeChef
#include<iostream>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--){
int n;
cin>>n;
cout<<n/6<<endl;
}
return 0;
}
Problem Link: CHFCLASS Problem - CodeChef
#include
using namespace std;
int main() {
int t,n;
cin>>t;
while(t–){
cin>>n;
if(n==6){
cout<<1<<endl;
}else if(n<6){
cout<<0<<endl;
}else{
int x=n/7;
if(n%7==6){
x+=1;
}
cout<<x<<endl;
}
}
return 0;
}