We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. All Contests
  2. ProjectEuler+
  3. Project Euler #197: Investigating the behaviour of a recursively defined sequence

Project Euler #197: Investigating the behaviour of a recursively defined sequence

Problem
Submissions
Leaderboard
Discussions

This problem is a programming version of Problem 197 from projecteuler.net

Given is the function ( is the floor-function), the sequence is defined by and .

Find for with given and . Your answer would be considered correct if it has absolute error not more than .

Input Format

Every test file contains two real numbers: and with no more than two digits after decimal point. These numbers are situated in a single line and are separated by a single space.

Constraints

Output Format

Output exactly one real number which is the answer to the problem.

Sample Input 0

0 30

Sample Output 0

1.473849410

Author

bayleef

Difficulty

Easy

Max Score

100

Submitted By

1137

Need Help?


View discussions
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy