```cpp
#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
int main()
{
int a,b,c,d,e,f,k;
char h;
cin>>a>>h>>b>>h>>c>>d>>h>>e>>h>>f>>k;
long long s1=3600*a+60*b+c,s2=3600*d+60*e+f;
s2-=s1;
s2*=k;
cout<<s2;
return 0;
}
```
by xxfdzl @ 2016-12-21 13:02:58
我知道用大家向上述一样的方法会AC(一定会的),但是能不能告诉我我的代码错在哪里?
by 4kilometers @ 2016-12-21 13:06:10
改成
```cpp
typedef ll long long;
```
by Focus_on @ 2016-12-21 16:54:26
```cpp
scanf("%I64d,%I64d,%I64d",&h,&m,&s);
下同,将':'换成','
```
by Focus_on @ 2016-12-21 16:56:44
大概也许可能应该会是你的"%I64d"错了,大概也许可能应该是"%lld"
by 飞奔的蜗牛 @ 2017-05-15 22:04:04
洛谷用的是Linux系统,应该用lld
by lizongru @ 2017-05-31 08:20:43
```cpp
#define long long
ll a;
```
@[y\_z\_h](/space/show?uid=33063) 用define可以的。
在编译时,编译器会将ll自动替换成long long继续编译。
即该代码等价于
```cpp
#define ll long long
long long a;
```
by 览遍千秋 @ 2017-08-15 12:50:22
打错了
第一个程序程序框中更改为
```cpp
#define ll long long
ll a;
```
by 览遍千秋 @ 2017-08-15 12:51:14
@[y\_z\_h](/space/show?uid=33063) scanf("%I64d,%I64d,%I64d",&h,&m,&s); ???
为什么要加 , 呢?
by xrz2895538112xrz @ 2017-08-30 10:06:45
快读解决一切问题(滑稽)
by NishikinoMaki @ 2017-08-31 16:30:01