#include<bits/stdc++.h>
#include<bits/stdc++.h>
using namespace std;
int a,b;
int res;
int ans;
int main()
{
cin>>a>>b;
//a=1;b=2;
srand(time(0));
while(res<=100000000)
{
res++;
ans=rand();
if(ans-a==b)
{
cout<<ans;
return 0;
}
}
return 0;
}
a=1,b=2;
本地:
3
--------------------------------
Process exited after 0.1829 seconds with return value 0
请按任意键继续. . .
洛谷