l1-024. Acquired time limit
Memory Limit 65536 KB
Code length limit 8000 B
Chen, standard author of the procedure for the award of questions
If today is Wednesday, the day after Tomorrow is Friday, if today is Saturday, the day after Tomorrow is Monday. We correspond Monday to Sunday with numbers 1 to 7. Given the day, please output the day after tomorrow is the days of the week.
Input Format:
Enter the first line to give a positive integer d (1 <= D <=7), representing the day of the week.
output Format:
The day of the week after which the day of D is exported in a row. Input Sample:
3
Sample output:
5
————————————————————————————————————
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <map>
using namespace std;
#define INF 0x3f3f3f3f
int main ()
{
int n;
scanf ("%d", &n);
n+=2;
if (n>7)
n-=7;
printf ("%d\n", n);
return 0;
}