有谁帮我看一下吗,错了一个点

P1615 西游记公司

@[LIUSASA](/user/993368) 康康我代码: ```cpp #include <iostream> using namespace std; int main(){ long long a, b, c, d, e, f, g; char m; cin >> a >> m >> b >> m >> c >> d >> m >> e >> m >> f >> g; cout << ((d*3600+e*60+f)-(a*3600+b*60+c))*g; return 0; } ``` This is easier :)
by shb20111113 @ 2023-09-26 21:20:23


@[shb20111113](/user/1003721) 我又看了看我的,不禁思考了起来
by LIUSASA @ 2023-09-26 21:23:45


@[LIUSASA](/user/993368) 开 long long 就好啦
by Michael_Liu @ 2023-09-26 21:24:23


@[LIUSASA](https://www.luogu.com.cn/user/993368)康康我代码: ```cpp #include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,e,f,n; scanf("%d:%d:%d\n%d:%d:%d\n%d",&a,&b,&c,&d,&e,&f,&n); printf("%lld",(((long long)d-a)*3600+(e-b)*60+(f-c))*n); return 0;} ```
by b2314huangruizhong @ 2023-09-26 21:24:48


开long long就行了
by dengjianxi @ 2023-09-26 21:55:32


@[b2314huangruizhong](/user/775383) 超easy!
by Andy404 @ 2024-02-19 20:09:52


|