📄 2476.cpp
字号:
/* This Code is Submitted by wywcgs for Problem 2476 on 2007-04-16 at 11:05:24 */
#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
int t, s, f, n, d;
while(scanf("%d %d %d %d %d", &t, &s, &f, &n, &d) != EOF) {
int step = n+(d-1)/s*(n-1)+(2*f+s-1)/(2*s)+((t-f-(n-1)*d)*2+s-1)/(2*s);
printf("%d\n", step);
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -