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 #53: Combinatoric selections

Project Euler #53: Combinatoric selections

Problem
Submissions
Leaderboard
Discussions

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

There are exactly ten ways of selecting three from five, :

In combinatorics, we use the notation,

In general,

It is not until , that a value exceeds one-million:

How many, not necessarily distinct, values of , for , are greater than K?

Input Format

Input contains two integers and .

Constraints


Output Format

Print the answer corresponding to the test case.

Sample Input

23 1000000

Sample Output

4

Author

shashank21j

Difficulty

Easy

Max Score

100

Submitted By

1724

Need Help?


View discussions
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits

Choose a translation


  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature