Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #define int int64_t
- using std::pow, std::llround;
- int func(int n)
- {
- long double result =
- (-10303.0 / 9979200.0L) * pow(n, 11) +
- (4073.0 / 64800.0L) * pow(n, 10) -
- (67169.0 / 40320.0L) * pow(n, 9) +
- (108929.0 / 4320.0L) * pow(n, 8) -
- (36326569.0 / 151200.0L) * pow(n, 7) +
- (32342993.0 / 21600.0L) * pow(n, 6) -
- (445599449.0 / 72576.0L) * pow(n, 5) +
- (210189113.0 / 12960.0L) * pow(n, 4) -
- (3951504773.0 / 151200.0L) * pow(n, 3) +
- (20582609.0 / 900.0L) * pow(n, 2) -
- (12420907.0 / 1540.0L) * n + 72;
- return llround(result);
- }
- int32_t main()
- {
- for(int i = 0; i < 12; ++i)
- std::cout << static_cast<char>(func(i));
- return 0;
- }
Add Comment
Please, Sign In to add comment