xzc_yhxr @ 2023-08-28 12:18:54
#include<bits/stdc++.h>
using namespace std ;
int s , v ;
int S ;
int main(){
scanf("%d %d" , &s , &v) ;
S = 24 * 60 + 8 * 60 - ceil(s / v) - 10 ;
int hour = S / 60 % 24 , minute = S % 60 - 1 ;
hour >= 10 ? printf("%d" , hour) : printf("%c%d" , '0' , hour) ;
printf(":") ;
minute >= 10 ? printf("%d" , minute) : printf("%c%d" , '0' , minute) ;
return 0 ;
}
倒数第二点过不去
by GoodLuckCat @ 2023-08-28 12:23:00
@xzc_yhxr
#include<cmath>
#include<iostream>
using namespace std;
int main()
{
int s,v,h,m,a;
cin>>s>>v;
a=1910-ceil((double)s/(double)v);
h=a/60;
m=a%60;
if(h>=24)h-=24;
if(h<10)cout<<0;
cout<<h<<":";
if(m<10)cout<<0;
cout<<m<<endl;
return 0;
}
by GoodLuckCat @ 2023-08-28 12:23:23
我的
by LuoNing__qaq @ 2023-08-28 14:53:24
我写过一篇这道题的题解,你可以看看有没有帮助ヾ(◍°∇°◍)ノ゙ P5707题解