So_Cute_Hamster @ 2024-03-21 19:37:00
#define ll long long
#define debug cout<<"debug"
#include<iostream>
using namespace std;
signed main(){
const char endl='\n';
std::ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int s,v,h,m;
cin>>s>>v;
h=(480-10-(s/v))/60;
m=(480-10-(s/v))%60-1;
if(m<10){
if(h<10){
cout<<0<<h<<':'<<0<<m;
}
else{
cout<<h<<':'<<0<<m;
}
}
else{
if(h<10){
cout<<0<<h<<':'<<m;
}
else{
cout<<h<<':'<<m;
}
}
}
提交记录
by xhl_leo @ 2024-04-10 14:34:20
#include<bits/stdc++.h>
using namespace std;
int main(){
double s,v,m;
int n,a,t,b;
cin>>s>>v;
n=8*60+24*60;
t=ceil(s/v)+10;
n=n-t;
if(n>=24*60) n-=24*60;
b=n%60;
a=n/60;
if(a<10){
if(b<10) cout<<"0"<<a<<":0"<<b;
else cout<<"0"<<a<<":"<<b;
}
else{
if(b<10) cout<<a<<":0"<<b;
else cout<<a<<":"<<b;
}
return 0;
}
求个关注