c8f20420e6b1b820d98ce50be61a74f1cd0f5313 — Andrew Thorp 3 years ago
Initial Commit
A  => README.md +6 -0
@@ 1,6 @@
# Kattis Solutions

My personal solutions to [Kattis](kattis) problems in various languages.


A  => odd_man_out/odd_man_out.py +37 -0
@@ 1,37 @@
    The first line of input gives the number of cases, N.
    N test cases follow. For each test case there will be:
        - One line containing the value G, the number of guests.
        - One line containing a space-separated list of G integers.
          Each integer C indicates the invitation code of a guest.
    You may assume that 1≤N≤50,0<C<231,3≤G<1000

    For each test case, output one line containing
    “Case #x: ” followed by the number C of the guest who is alone.
n = int(input())
for i in range(n):
    # There may be optimization around knowing G,
    # but since Sets do not allow an initial size
    # I could not think of any. If they did, we
    # eliminate set resize time (should the set
    # initial list size be exceeded).
    # Iterating through the list of codes,
    # we are operating under the assumption that
    # only two occurrences of any number can appear
    for c in input().split(' '))
        # Add new elements to a set
        if c in found:
        # Delete duplicate elements from the set
    # Since the only item without a duplicate is the
    # solution, and we deleted all duplicates, popping
    # the found set should return the solution AND empty
    # the set for the next loop
    print(f"Case #{i+1}: {int(found.pop())}")

A  => stuck_in_a_time_loop/main.go +19 -0
@@ 1,19 @@
package main

import (

func main() {
	fmt.Print("Enter number: ")
	var in string
	n, err := strconv.Atoi(in)
	if err != nil {
		fmt.Printf("Thats not a number: %v\n", err)
	for i := 1; i <= n {
		fmt.Printf("%d Abracadabra\n", i++)

A  => stuck_in_a_time_loop/stuck_in_a_time_loop +0 -0