COGS 1299. bplusa【听说比a+b还要水的大水题???】

时间:2023-03-09 04:46:32
COGS 1299. bplusa【听说比a+b还要水的大水题???】

1299. bplusa

☆   输入文件:bplusa.in   输出文件:bplusa.out   评测插件
时间限制:1 s  
内存限制:128 MB

【题目描述】

输入一个整数n,将其拆为两个非负整数a,b,使a,b的和等于n。

【输入格式】

输入数据只有一行,为一个整数。

【输出格式】

输出数据只有一行,两个整数,中间用一个空格隔开。

【样例输入】

5

【样例输出】

2 3

题目链接:http://cogs.cf/cogs/problem/problem.php?pid=1299

分析:这题好像怎么输出都能过?确实是这样的呢,我试了下,输出0,n也能AC,(^-^)V纯属娱乐题hhh

下面给出AC代码:

 #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n;
int main()
{
freopen("bplusa.in","r",stdin);
freopen("bplusa.out","w",stdout);
cin>>n;
/*
if(n%2==0)
{
cout<<n/2<<" "<<n/2<<endl;
return 0;
}
cout<<n/2<<" "<<n-n/2<<endl;
*/
cout<<<<" "<<n<<endl;
return ;
}