全WA求助
查看原帖
全WA求助
1086459
Ghy_boy楼主2023/12/22 21:56
#include<bits/stdc++.h>
using namespace std;
int a;
struct Compfunr{
	long long shi,fen,miao;
	long long ans;
};
Compfunr operator +(Compfunr &t1,Compfunr &t2){
	t1.shi*=3600,t2.shi*=3600;
	t2.fen*=60,t1.fen*=60;
	t1.miao+=t1.shi+t1.fen;
	t2.miao+=t2.shi+t2.fen;
	t1.ans=t2.miao-t1.miao;
	return t1;
}
int main()
{
    Compfunr t1,t2,s;
    scanf("%lld:%lld:%lld",&t1.shi,&t1.fen,&t1.miao);
    scanf("%lld:%lld:%lld",&t2.shi,&t2.fen,&t2.miao);
	cin>>a;
	cout<<t1.ans*a<<endl;
return 0;
}

2023/12/22 21:56
加载中...