求助卡在70分QAQ

P5707 【深基2.例12】上学迟到

Xiaoovo @ 2024-10-12 23:40:12

s,v=map(int,input().split(" "))

t=s/v+10

x=480-t #总时间减用掉的

h=int(x//60)

m=int(x % 60)

print(f'{h:02d}{":"}{m:02d}')


by yuanzekai123 @ 2024-10-13 16:45:17

#include<bits/stdc++.h>
using namespace std;
int main()
{
    double s,v,t;
    cin>>s>>v;
    t=ceil(s/v)+10;
    int h=ceil(t/60);
    int m=(int)t%60;
    printf("%.02d:%.02d",(8-h+24)%24,(0-m+60)%60);
    return 0;
}

@Xiaoovo


|