Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long double ld;
- const ld EPS = 1e-9;
- int main() {
- int n; cin >> n;
- ld coef = 1; int expo = 0;
- for (ld i = 1; i <= n; i++) {
- coef *= i;
- while (!(coef < 10.0 - EPS)) {
- coef /= 10.0;
- expo++;
- }
- }
- cout << fixed << setprecision(9) << coef << "e+" << expo << '\n';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement