全WA求助

P1615 西游记公司

没那么麻烦吧,这又是重定向又是struct的 看看这个: ```cpp #include<iostream> using namespace std; int main() { int a, b, c; char s; cin >> a >>s>> b >>s>> c; int q, w, e; cin >> q >> s >> w >> s >> e; int n; cin >> n; long long l1 = a * 3600 + b * 60 + c; long long l2 = q * 3600 + w * 60 + e; long long l3 = l2 - l1; if (l3 < 0) { l3 = 0; } cout << l3 * n; } ```
by zx_LWL @ 2023-12-29 21:37:55


Look at me ``` #include<bits/stdc++.h> using namespace std; #define H 3600 #define M 60 #define S 1 int main(){ long long int H1,H2,M1,M2,S1,S2,n,tmp;char ch; cin>>H1>>ch>>M1>>ch>>S1>>H2>>ch>>M2>>ch>>S2>>n; tmp = (((H2-H1)*H)*n)+(((M2-M1)*M)*n)+(((S2-S1)*S)*n); cout<<tmp; return 0; } ```
by LiuYuLin365 @ 2024-03-16 12:32:10


|