Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //thanks God For Every Thing!
- //contest link:
- //#include<bits/stdc++.h>
- #include <iostream>
- #include <fstream>
- #include <string>
- #include <algorithm>
- #include <cmath>
- #include <cstdio>
- /*
- */
- #define pi acose(-1)
- #define flush cin.ignore(numeric_limits<streamsize>::max(),'\n');
- #define wow ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
- #define NL printf("\n")
- #define fin freopen("int.txt","r",stdin);
- #define fout freopen("out.txt","w",stdout);
- using namespace std;
- typedef long long int ll;
- typedef double dl;
- // ---------------------- slove---------------------------//
- int main()
- {
- fin
- fout
- int n;
- cin>>n;
- if(n<20) cout<<"Too Small"<<endl;
- else
- {
- if(n%2==0)
- {
- for(int i=n-1; i>0; i-=2)
- {
- if(i==1)
- {
- cout<<i<<endl;
- }
- else
- {
- cout<<i<<"-";
- }
- }
- }
- else
- {
- for(int i=n; i>0; i-=2)
- {
- if(i==1)
- {
- cout<<i<<endl;
- }
- else
- {
- cout<<i<<"-";
- }
- }
- }
- }
- return 0;
- }
- //author anikaksh;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement