Блог пользователя vortex_nitt

Автор vortex_nitt, история, 4 года назад, По-английски

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!!

  • Проголосовать: нравится
  • +36
  • Проголосовать: не нравится

»
4 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +2 Проголосовать: не нравится

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 года назад, скрыть # ^ |
    Rev. 3  
    Проголосовать: нравится +9 Проголосовать: не нравится

    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 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Editorial ??

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Hey, is the editorial up?