求助大佬,为什么输不出来???
查看原帖
求助大佬,为什么输不出来???
1394732
junbeder楼主2024/8/4 20:23
#include<iostream>
using namespace std;
int main(){
	int x,n,i,c;
	cin>>x>>n>>i>>c;
	i<60;
	n<60;
	x<24;
	if(c=='A')
	cout<<(x*60*60)+(n*60)+i<<endl;
	if(c=='P')
	cout<<((x+12)*60*60)+(n*60)+i<<endl;
	return 0;
}
2024/8/4 20:23
加载中...