fork download
  1.  
  2. //|Art|
  3. #include<iostream>
  4. #include <sstream>
  5. #include <iomanip>
  6. #include <chrono>
  7. #include <cmath>
  8. #define inout() ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  9. #define el cout << '\n'
  10. #define fi first
  11. #define se second
  12. #define pb push_back
  13. #define pf push_front
  14. #define ll unsigned long long
  15. #define N 100000
  16. #define sz(x) (x).size()
  17. #define all(v) (v).begin(), (v).end()
  18. #define FOR(a,b,c) for(int a=b;a<=c;++a)
  19. #define FORE(a,b,c) for(int a=b;a>=c;--a)
  20. #define __Art__ signed main()
  21. #define NAME "Art"
  22. using namespace std;
  23. long double k[] = {0.0, 10.0, 5.0, 10.0, 5.0, 2.0, 5.0, 10.0, 5.0, 10.0};
  24. ll cntdi (string a){
  25. bool pas = 0;
  26. ll cnt = 0;
  27. FOR (i, 0, sz(a) - 1){
  28. if (a[i] == '.') pas = 1;
  29. if (pas == 1) ++cnt;
  30. }
  31. return cnt - 1;
  32. }
  33. ll pos (ll a, ll b){
  34. ll r = 1;
  35. while (b--) r *= a * 1LL;
  36. return r;
  37. }
  38. void sol(){
  39. long double l;
  40. cin >> l;
  41. if ((ll)l == l) return cout << 1, void();
  42. ostringstream oss;
  43. oss << setprecision(18) << l;
  44. string a = oss.str();
  45. int r = 1;
  46. while (a[sz(a) - 1] == '0') a.erase(sz(a) - 1, 1);
  47. long double lr = 1.000000000;
  48. cout << lr;
  49.  
  50. }
  51. __Art__{
  52. if (fopen(NAME".INP", "r")) {
  53. freopen(NAME".INP", "r", stdin);
  54. freopen(NAME".OUT", "w", stdout);
  55. }
  56. inout();
  57. int t = 1;
  58. //cin >> t;
  59. while (t--) sol();
  60. cerr << "\nTime elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << "s\n";
  61. return (0 ^ 0);
  62. }
  63.  
Success #stdin #stdout #stderr 0.01s 5280KB
stdin
3.2131024242
stdout
1
stderr
Time elapsed: 0.00727s