求改

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

HZY1618yzh @ 2024-10-27 11:57:07

#include <bits/stdc++.h>
using namespace std;
int main(){
    int a,s,b,g=0;
    cin>>a>>s;
    if(a%s==0){
        b=a/s+10;
    }else{
        b=a/s+11;
    }
    g=b/60;
    g=24-g;
    if(g>16){
        cout<<0<<g-17;
    }else{
        cout<<g+8;
    }
    if(b%60!=0){ 
    cout<<':'<<60-b%60;
    }else{
        cout<<':'<<"00";
    }
    return 0;
}

by fangkai123 @ 2024-10-27 12:10:12

#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;
}

by fangkai123 @ 2024-10-27 12:11:51

求关,会互关 小号能不能也关一下:fangkai321 @HZY1618yzh


by HZY1618yzh @ 2024-11-01 20:26:03

谢谢


|