Advertisement
Saleh127

UVA 11780

Sep 22nd, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10. ll a;
  11. double c,ans;
  12. while(cin>>a && a)
  13. {
  14. c=a*1.6;
  15. ans=min(ceil(c)-c,c-floor(c));
  16. ///ceil and floor er sathe actual minimum tai ans
  17. printf("%.2lf\n",ans);
  18. }
  19.  
  20.  
  21. return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement