fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define faster ios_base::sync_with_stdio(false); cin.tie(NULL)
  4. #define Bit(mask , i) ((mask >> i) & 1)
  5. #define fi first
  6. #define se second
  7. #define _LOG2(nl) 31 - __builtin_clz(nl)
  8. #define c_bit(nl) __builtin_popcount(nl)
  9. #define ii pair<int , pair<int , int>>
  10. #define lii pair<long long , pair<int , int>>
  11. #define li pair<long long , int>
  12. #define db double
  13. #define onBit(mask , i) (mask | (1 << i))
  14. #define offBit(mask , i) (mask & (~(1 << i)))
  15.  
  16. long long t;
  17.  
  18. void inp(){
  19. cin >> t;
  20. }
  21.  
  22. void solve(){
  23. long long res = 0;
  24. if (t < 99 * 1600){
  25. res += t / 1600;
  26. cout << res;
  27. return;
  28. }
  29. res += 99;
  30. t -= 99 * 1600;
  31. if (t <= 100 * 2500){
  32. res += t / 2500;
  33. cout << res;
  34. return;
  35. }
  36. res += 100;
  37. t -= 100 * 2500;
  38. if (t <= 300 * 5000){
  39. res += t / 5000;
  40. cout << res;
  41. return;
  42. }
  43. res += 300;
  44. t -= 300 * 5000;
  45. res += t / 10000;
  46. cout << res;
  47. }
  48.  
  49. int main(){
  50. // if (fopen("cau1.inp" , "r")){
  51. // freopen("cau1.inp" , "r" , stdin);
  52. // freopen("cau1.out" , "w" , stdout);
  53. // }
  54. faster;
  55. inp();
  56. solve();
  57. return 0;
  58. }
  59.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
Standard output is empty