Advertisement
Anik_Akash

Q no 3

Oct 28th, 2020
875
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.10 KB | None | 0 0
  1. //thanks God For Every Thing!
  2. //contest link:
  3.  
  4. //#include<bits/stdc++.h>
  5. #include <iostream>
  6. #include <fstream>
  7. #include <string>
  8. #include <algorithm>
  9. #include <cmath>
  10. #include <cstdio>
  11.  
  12. /*
  13.  
  14.            
  15.  
  16. */
  17. #define pi           acose(-1)
  18. #define flush        cin.ignore(numeric_limits<streamsize>::max(),'\n');
  19. #define wow          ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  20. #define NL           printf("\n")
  21. #define fin          freopen("int.txt","r",stdin);
  22. #define fout         freopen("out.txt","w",stdout);
  23.  
  24.  
  25. using namespace std;
  26.  
  27. typedef long long int ll;
  28. typedef double dl;
  29.  
  30. // ---------------------- slove---------------------------//
  31.  
  32. int to_even();
  33.  
  34. int id=14210;
  35.  
  36. int main()
  37. {
  38.     //fin
  39.    //fout
  40.     int last_two=0;
  41.     last_two = id%100;
  42.     int f_part=0, m_part=0, l_part=0;
  43.     f_part = 20000-id;
  44.     m_part = to_even();
  45.     l_part = id+last_two;
  46.  
  47.     cout<<f_part<<"-"<<m_part<<"-"<<l_part<<endl;
  48.    
  49.     return 0;
  50. }
  51. int to_even()
  52. {
  53.     int cnt=0;
  54.     for(int i=id+2; i<20000; i+=2){
  55.         cnt++;
  56.     }
  57.     return cnt;
  58. }
  59. //author anikaksh;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement