fork(2) download
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cmath>
  4. #include <limits>
  5.  
  6. using namespace std;
  7. float proc[200000];
  8. float wtorn[200000];
  9. float testy;
  10. float wynik[100000];
  11. int main()
  12. {
  13. cin >> testy;
  14. int i;
  15. for (int i=0; i<testy; i++)
  16. {
  17. cin >> proc[i] >> wtorn[i];
  18. proc[i]=proc[i]*0.01;
  19. wtorn[i]=wtorn[i]*0.01;
  20. }
  21. i=0;
  22. for (int i=0; i<testy; i++)
  23. {
  24. wynik[i]=((1-(proc[i]*wtorn[i]))*100);
  25.  
  26. if(wynik[i]-int(wynik[i]) == 0)
  27. {
  28. cout <<wynik[i] <<".00"<<endl;
  29. }
  30. else if(wynik[i]-int(wynik[i]) != 0)
  31. {
  32. cout <<setprecision(2)<<wynik[i]<<endl;
  33. }
  34.  
  35. }
  36. }
  37.  
Success #stdin #stdout 0s 17192KB
stdin
Standard input is empty
stdout
Standard output is empty