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

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Apply
  • Hiring developers?
  1. All Contests
  2. ProjectEuler+
  3. Project Euler #29: Distinct powers
  4. Discussions

Project Euler #29: Distinct powers

Contest ends in
Problem
Submissions
Leaderboard
Discussions

    You are viewing a single comment's thread. Return to all comments →

  • MohitJI
    4 years ago+ 0 comments

    n=int(input()) l={0} for i in range(2,n+1): for j in range(2,n+1): l.add(pow(i,j))
    print(len(l)-1)

    problem on this code why it fail in many test cases

    0|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy