CF670A.Holidays
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
On the planet Mars a year lasts exactly n days (there are no leap years on Mars). But Martians have the same weeks as earthlings — 5 work days 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.
在火星上,一年恰好有 n 天(火星上没有闰年)。但火星人的星期与地球人相同——5 个工作日,随后是 2 天休息日。你的任务是确定火星上一年中休息日的最少天数和最多天数。
输入格式
The first line of the input contains a positive integer n (1 ≤ n ≤ 1 000 000) — the number of days in a year on Mars.
输入的第一行包含一个正整数 n(1 ≤ n ≤ 1 000 000)—— 火星上一年的天数。
输出格式
Print two integers — the minimum possible and the maximum possible number of days off per year on Mars.
输出两个整数——火星上每年可能的最少和最多休息天数。
输入输出样例
输入#1
14
输出#1
4 4
输入#2
2
输出#2
0 2
说明/提示
In the first sample there are 14 days in a year on Mars, and therefore independently of the day a year starts with there will be exactly 4 days off .
In the second sample there are only 2 days in a year on Mars, and they can both be either work days or days off.
在第一个样例中,火星上一年有 14 天,因此无论一年从哪一天开始,都恰好有 4 天休息日。
在第二个样例中,火星上一年仅有 2 天,且这两天既可以都是工作日,也可以都是休息日。
输入解题思路,AI测评打分。不知道怎么写?