fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. double S = 0;
  7. cin >> n;
  8. S = 1-(1/n);
  9. cout << S;
  10. return 0;
  11. }
Success #stdin #stdout 0s 4256KB
stdin
500
stdout
1