P1424 Little Fish's Journey (Improved Version)
Description
There is a little fish that swims $250$ kilometers every weekday and rests on weekends (two-day weekend). Starting from day $x$ of the week, after $n$ days, how many kilometers has the little fish swum in total?
Input Format
Two positive integers $x, n$, meaning starting from day $x$ of the week and continuing for $n$ days.
Output Format
Output a single integer, the total number of kilometers the little fish has swum.
Explanation/Hint
The testdata guarantees $1\le x \le 7$, $1 \le n\le 10^6$.
Translated by ChatGPT 5