Codeforces Round #350 (Div. 2) A

Source: Internet
Author: User

Description

On the planet Mars A is lasts exactly n days (there is no leap years on Mars). But Martians has the same weeks as earthlings-5 and then 2 days off. Your task is to determine the minimum possible and the maximum possible number of days off per year on Mars.

Input

The first line of the input contains a positive integer n (1≤ n ≤1)-the number of Da Ys in a year on Mars.

Output

Print integers-the minimum possible and the maximum possible number of days off per year on Mars.

Examples input
14
Output
4 4
input
2
Output
0 2
Give me a few days, ask at least a few holidays, up to a few holidays ~
Look at the remainder of the situation ~
Just a discussion.
#include <stdio.h>//#include <bits/stdc++.h> #include <string.h> #include <iostream> #include <stack> #include <math.h> #include <map> #include <sstream> #include <set> #include < queue> #include <vector> #include <algorithm> #include <limits.h> #define INF 0x3fffffff#define LLL    L,m,rt<<1#define RRR r,m+1,rt<<1|1using namespace Std;int main () {int n;    cin>>n;    if (n==1) {cout<< "0" << "" << "1" <<endl;    } else if (2<=n&&n<=5) {cout<< "0" << "" << "2" <<endl;    } else if (n==6) {cout<< "1" << "" << "2" <<endl;        } else {int pot;        int POS;        pot=n/7*2;        pos=n/7*2;        if (n%7>=0&&n%7<=5) {cout<<pot<< "";        } else {cout<<pot+1<< ""; } if (n%7==1) {COUT&Lt;<pos+1<<endl;        } else if (n%7==0) {cout<<pos<<endl;        } else {cout<<pos+2<<endl; }} return 0;}

  

Codeforces Round #350 (Div. 2) A

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.