Griezmann_7 @ 2023-09-11 17:02:45
#include<iostream>
#include<cstdio>
using namespace std;
int main() {
double s, v;
cin >> s >> v;
int t = ceil(s / v);
int sum = t + 10;
int sum_minute = 8 * 60 - sum;
int hour = sum_minute / 60;
int minute = sum_minute % 60;
printf("%02d:%d", hour, minute);
}
by wannacry_ @ 2023-09-11 17:04:15
@Griezmann_7 要加 cmath
库·
by shengyeqi @ 2023-09-11 17:05:29
@Griezmann_7
加上头文件#include<cmath>
求关注
by shengyeqi @ 2023-09-11 17:09:05
也可以加#include<bits/stdc++.h>
这个万能头
by HashHacker_Peas @ 2023-09-11 17:17:50
ceil
函数是头文件#include<cmath>
里面的,
在程序中添加#include<cmath>
就好了