Git Product home page Git Product logo

gutscodeolympics2023repo's Introduction

GUTSCodeHackathon

This was great fun to do, though it was a shame that the weigh it was all weighted means that hackerrank was in hindsight a waste of time but ive archived my solutions as .py files with the main question stored inside for ease of understand and reading

Read further for:

Non-solutions that returned marks

Hey to be fair, reverse engineering tests on questions can be fun

Changing Usernames

This was a relatively obvious one as the two accepted outputs are "Yes" and "No" so initially we started with

print("Yes")

This returned 16.5/30 which was great, but upon talking to some friends about optimising, I joked about randomising and we realised this was an actually not bad idea so naturally we ran a basic randomizer in

import random

if random.randint(0,10)%2 == 0 :
    print("Yes")
else:
    print("No")

which returned a max score of 19.5 for me, but shoutout to kisbodi111 who managed to get an astronomically rare 25.5/30

Best representation

common output format is

1
1

so we just do

print(1)
print(1)

which returns a whopping 22.97/70

They who come First will be served first

 print(1) 

returns 6.77/70 marks

Removing the branches 6.15/80

 for nums = [eval(i) for i in input().split(" ")] 
 print(nums[0])

Shorten to three

This only takes a single int so we randomise and hope for the best, the best result i got was 9.23/90 for

import random
r = int(input())
print(random.randint(0,r**2))

Increment or Logic Gate

this has the exceptional case returning -1, so logically

print(-1)

returns us 3.57/100

Less than 3

This was an informed guess that one of the standard cases was the amount of swaps directly correlated to the number of bits, which led to the

print(int(input())) 

line which returns 12.97/120

gutscodeolympics2023repo's People

Contributors

arsenic-33 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.