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. Mathematics
  3. Fundamentals
  4. Connecting Towns
  5. Discussions

Connecting Towns

Problem
Submissions
Leaderboard
Discussions
Editorial

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

  • nilkun
    5 years ago+ 3 comments

    Snippet.

    for(int j = 0; j < towns - 1; j++) {
                    routes *= scanner.nextInt();
                    for(;;) {
                    if (routes > 1234567) routes = routes - 1234567;
                        else break;
                	}
    }
    
    3|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature