#include<bits/stdc++.h> using namespace std; //1 0 //2 0 //3 1 //4 2 //5 4 //6 6 //7 9 int kay(int n) { if(n==1||n==2) return 0; return kay(n-2)+n-2; } int main() { int n; while(cin>>n) { cout<<kay(n)<<endl; } } |
Double click to view unformatted code.