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. Prepare
  2. Python
  3. Introduction
  4. Python: Division
  5. Discussions

Python: Division

Problem
Submissions
Leaderboard
Discussions
Editorial
Tutorial

Sort 675 Discussions, By:

votes

Please Login in order to post a comment

  • sarbazx
    5 years ago+ 18 comments
    print("{0}\n{1}".format(a//b, a/b))
    
    69|
    Permalink
    View more Comments..
  • coder_aky
    3 years ago+ 9 comments

    100% working ,Simple and easy :-)

    Here's Python 3 one liner.....

    a,b=int(input()),int(input());print(a//b,a/b,sep='\n')
    
    10|
    Permalink
    View more Comments..
  • robervalchocolat
    3 years ago+ 1 comment

    nl = '\n'

    print(f"{a//b}{nl}{a/b}")

    Using the f-string - new format

    7|
    Permalink
  • vinithvinu07
    5 years ago+ 5 comments

    I have tried this, Passed all test cases

    print((a//b),(a/b),sep='\n');

    6|
    Permalink
    View more Comments..
  • jaddujeyanth07_1
    2 months ago+ 3 comments

    vanakam da mapula mepco la irru thu

    1|
    Permalink
Load more conversations

Need Help?


View tutorial
View editorial
View top submissions
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature