|
|
вернуться в форумWR6 TEST # include <iostream> using namespace std; int main () { int n,k,sol; cin>>n>>k; if(int(n/2) && 1<=k<=n<=50){ if(k<=n/2) sol=n-3; if(k>n/2) sol=k-3; if(n==2) sol=0; } cout<<sol<<endl; } Edited by author 26.06.2014 22:00 ac AC if(k<=n/2) sol=n-2-k; Edited by author 09.07.2014 22:52 |
|
|