Codeforces Holidays
// Accepted
// reminder 6 er jonno minimum 1 hobe karon 5 din working day er por 6 number day off day, basically maximum 2 kore agabe,
// but except reminder 6. :)
#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false)
typedef long long LL;
int main()
{
fast;
LL n;
while(cin >> n)
{
LL qotient = n / 7;
LL reminder = n % 7;
LL mx=(qotient*2), mn=mx;
if(reminder > 0)
{
if(reminder == 1)
{
mx+=1;
}
else
{
mx+=2;
}
if(reminder == 6)
{
mn+=1;
}
}
cout << mn << " " << mx << "\n";
}
return 0;
}
// reminder 6 er jonno minimum 1 hobe karon 5 din working day er por 6 number day off day, basically maximum 2 kore agabe,
// but except reminder 6. :)
#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false)
typedef long long LL;
int main()
{
fast;
LL n;
while(cin >> n)
{
LL qotient = n / 7;
LL reminder = n % 7;
LL mx=(qotient*2), mn=mx;
if(reminder > 0)
{
if(reminder == 1)
{
mx+=1;
}
else
{
mx+=2;
}
if(reminder == 6)
{
mn+=1;
}
}
cout << mn << " " << mx << "\n";
}
return 0;
}
Comments
Post a Comment