repl.it
@Matsygorovat/

фазаны и кролики

C++

No description

fork
loading
Files
  • main.cpp
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
using namespace std;
#include <bits/stdc++.h>

int main() {
int N,M,f,r;
cin>>N>>M;
if ((M-2*N)%2==0 or M<N*2 ) {
r=(M-2*N)/2;
f=N-(M-2*N)/2;
cout<<f<<" "<<r;
}else cout<<"no";
cout<<endl;
}