vortex_nitt's blog

By vortex_nitt, history, 4 years ago, In English

Given a problem, you can think of a solution. But given an answer, can you think of a solution? Vortex welcomes you to participate in a one of a kind event with Hunt the Code! Twist your brain to generate solutions for a given answer!

Contest Link : https://www.hackerrank.com/hunt-the-code-2022

Contest Timing : 20:00 to 22:30 IST, 26th Feb

Duration : 2:30 hours

CASH PRIZES Distribution (Only for Indians):

  • INR 1500
  • INR 1000
  • INR 500

Registeration for Prizes: Either fill up the GForm or use the same email registered with Vortex website to participate in this event for validation to get the prizes

For more info : Hunt The Code

We have put great effort into preparing for this contest. We genuinely hope that you will enjoy retracing the source code from the combination of inputs & outputs and writing optimised code to run it against hidden test cases.

Good Luck & Have Fun! Hope to see you participating!!

  • Vote: I like it
  • +36
  • Vote: I do not like it

| Write comment?
»
4 years ago, hide # |
Rev. 2  
Vote: I like it +2 Vote: I do not like it

Why is this submission giving WA for Q9? I checked it for so many samples and it was right everytime. On submission it was showing WA for all the test cases. Basically just multiply the answer with $$$i$$$ if $$$i$$$ is a prime, else increment i :(

Code
  • »
    »
    4 years ago, hide # ^ |
    Rev. 3  
    Vote: I like it +9 Vote: I do not like it

    Your idea to multiply all primes $$$ \lt = n$$$ is correct. You just had to use int instead of long long and let the product overflow, to get full points. Idk if that was intended, but that gave me full points. I thought about this after seeing the output for $$$21 - 40$$$. Notice the using ll = int;

    My code
»
4 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Editorial ??

»
4 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Hey, is the editorial up?