warning C4518: '__int64 ' : storage-class or type specifier(s) unexpected here; ignored

warning C4518: '__int64 ' : storage-class or type specifier(s) unexpected here; ignored


#include<iostream>
using namespace std;


__int64 ttemp=0,ktemp=0;




/*ttemp、ktemp相当于等式中的x,y*/
__int64 exgcd(__int64 a,__int64 b)
{
if(b==0)
{
ktemp=0;
ttemp=1;
return a;
}
__int64 d = exgcd(b,a%b);
__int64 temp =ttemp;
ttemp = ktemp;
ktemp = ttemp - (a/b)* ktemp;
return d;
}




/*


根据题意 设 step 青蛙跳的步数
则有 abs((x + m × t) - (y + n × t)) =  k × L ; 成立
则有 (m - n) × t - (y - x ) = k × L;
则有 (m - n ) × t  - k × L = (y - x) 
所以 令 temp = (m - n),kemp = (y - x),cemp = L;
则原式变为 temp *  t + cemp * k = kemp;
即为 a * x + b * y = c;的形式




*/
int main()
{
__int64 a=0,b=0,c=0,
__int64  x=0,y=0,m=0,n=0,l=0;
__int64 gcdValue=0;


scanf("%I64d%I64d%I64d%I64d%I64d",&x,&y,&m,&n,&l);
if(m==n && x != y)
{
printf("Impossible\n");
return 0;
}


if(m > n)
{
a = m-n;
c = y-x;
}
else
{
a = n-m;
c = x-y;
}


gcdValue = exgcd(a,l);


if(m==n || c % gcdValue !=0)
{
printf("Impossible\n");
return 0;
}


printf("%I64d",(c/gcdValue));


return 0;
}




找了一下,原来是_

_int64 a=0,b=0,c=0,

__int64  x=0,y=0,m=0,n=0,l=0;

逗号结尾了,逗号改为分号即可。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值