题解:P14495 [NCPC 2025] Arithmetic Adaptation
一道模拟题,按照题意枚举即可,但是要注意判断
代码如下:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int s;
cin>>s;
for(int i=-999;i<=999;i++)
{
for(int j=-999;j<=999;j++)
{
if(i+j==s and i!=0 and j!=0)
{
cout<<i<<" "<<j;
return 0;
}
}
}
}