70分
查看原帖
70分
1305235
chinojane楼主2024/8/27 12:22

这钱做过的题 为啥错了

#include<bits/stdc++.h>
using namespace std;
int main(){
	int s,y,t,t2,t3,h,m;
	cin>>s>>y;
	t=s/y;
	if(s%y!=0){t++;}
	t2=t+10;
	t3=480-t2;
	h=t3/60;
	m=t3%60;
	if(h<10) {cout<<"0"<<h;}
    else{cout<<h;}
    if(m<10) {cout<<":"<<"0"<<m;}
    else{cout<<":"<<m;}
}

2024/8/27 12:22
加载中...