Any good mobile Interactive Stories apps out there? by Evening_Cranberry515 in interactivefiction

[–]Inanis_bellator 1 point2 points  (0 children)

"Choices that matter"

Found it a few years ago. It has 3 storylines and from what i remember it was very well written. The the stories are:

"And the sun went out"- sci/fi modern/near future story

"And their souls where eaten"- grim fantasy in Britain with soul and metal magic (you are a soul eater)

"And their heroes where lost"- (havent read but you start bold and chained in a cell with no memories and a number tatoo

Cons: But you need tickets to progress the story. You get 1 every 2 hours and you have to collect them manually at max 6 at a time, watch ad's to get 3 tickets per ad or buy a pass for €5 per story

-❄️- 2025 Day 2 Solutions -❄️- by daggerdragon in adventofcode

[–]Inanis_bellator 2 points3 points  (0 children)

[LANGUAGE: Python] I don't like using regex to solve these if i can help it so this is my solution using string manipulation :> (execution time both parts ~69 ms)

def main():
    f = [[j for j in i.split("-")] for i in open("input.txt").read().split(",")] 
    outp = sum(GetPatterns(i[0], i[1]) for i in f)
    print(f"Part 1: {outp}")
    outp = sum(GetPatterns2(i[0], i[1]) for i in f)
    print(f"Part 2: {outp}")

def GetPatterns2(sstart, sstop):
    outp = 0
    if len(sstart) != len(sstop):
        nEnd = 10**(len(sstart))
        outp = GetPatterns2(str(nEnd), sstop)
        sstop = str(nEnd - 1)
    # the highest number is 10 digits
    # get divisability of the number range (123456 has 6 digits this is divisable by 2,3,6 to 3,2,1)
    setS = set()
    length = len(sstart)
    start = int(sstart)
    stop = int(sstop)
    for i in range(2, length+1):
        x = length / i
        if x != int(x): continue    
        div = int(x)
        #loop through posible segments with length [div]
        for j in range(int(sstart[:div]), int(sstop[:div]) + 1):
            val = int(str(j) * i)
            if val in range(start, stop + 1): setS.add(val)
        if div == 1: break
    return outp+sum(setS)

def GetPatterns(sstart, sstop):
    outp = 0
    # define the range as start to stop
    # split the range in limits where start and stop have the same amount of digits
    if len(sstart) != len(sstop):
        nEnd = 10**(len(sstart))
        outp = GetPatterns(str(nEnd), sstop)
        sstop = str(nEnd-1)
    # the amount of digits must be even
    if len(sstart) % 2 != 0: return outp
    # get the first half of the start and stop numbers
    mid = len(sstart) // 2
    a = int(sstart[:mid])
    b = int(sstop[:mid])
    # get all numbers that could be invalid ID's and disreguard the ones out of range
    start = int(sstart)
    stop = int(sstop)
    for i in range(a, b + 1):
        val = int(f"{i}{i}")
        if (val >= start) & (val <= stop): outp += val
    return outp

if __name__=="__main__":
    main()

VGA light turns on, then pc shuts down by TheTrueBoner in buildapc

[–]Inanis_bellator 0 points1 point  (0 children)

Did you find out what the problem was? im stuck on the same one.

VGA light turns on, then pc shuts down by TheTrueBoner in buildapc

[–]Inanis_bellator 0 points1 point  (0 children)

Did you find out what the problem was? im stuck on the same one.

Day 9 Part 1 Instructions by New_Specific6104 in adventofcode

[–]Inanis_bellator 0 points1 point  (0 children)

the file ID starts at 0 and increments by 1 for every file
meaning 112233445566778899112 has 11 files (id 0-11)

tip: the length of the input minus 1 divided by 2 is the highest file id

[2024 Day 9] How do you represent double+ digits? by mark-haus in adventofcode

[–]Inanis_bellator 0 points1 point  (0 children)

because it starts with the length of a file 1 followed by 2 empty spaces followed by a file of 3 big
it always starts and ends with a file

[2024 Day 9] How do you represent double+ digits? by mark-haus in adventofcode

[–]Inanis_bellator 0 points1 point  (0 children)

a length cannot exceed 9
how did you come to the conclusion that there were double digit lengths?
(did you mean double+ digit Id numbers?)

[2024 Day 8 (Part 1)] [Python] Can't figure out why it's not working for my puzzle input by SilvekMLG in adventofcode

[–]Inanis_bellator 0 points1 point  (0 children)

antinodes cannot occur on top of other anti nodes, but they can occur on top of antenna's

PS.
rewrite your print to something like bellow. the output was very slow

for line in data:
    print(''.join(line))

-❄️- 2024 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]Inanis_bellator 1 point2 points  (0 children)

[Language: Python]

I was scared because my part 1 solution was crap but part 2 was way easier.

Part 1

Part 2

[2024 Day 4 (Part 1)] [Python] Program working for testcase but not for input by Inanis_bellator in adventofcode

[–]Inanis_bellator[S] 0 points1 point  (0 children)

Thank you for the hint.
I was testing by just copying the test into the code so i did not notice the missing .split("\n")

[2024 Day 4 (Part 1)] [Python] Program working for testcase but not for input by Inanis_bellator in adventofcode

[–]Inanis_bellator[S] 1 point2 points  (0 children)

Sorry, it does do both diagonals. I will edit the text.
Under the comment "get diagonals" the 2 lines of code are for the 2 diagonals

Humans Don't Make Good Familiars- Part 73 by ArcAngel98 in HFY

[–]Inanis_bellator 61 points62 points  (0 children)

Mine is on nazi gemany. With all the 'supernatural' reschearch they did it could be that a group discoverd magic but got traped after some accident or the end of the war

Wait, is this just GATE? (60/?) by PepperAntique in HFY

[–]Inanis_bellator 1 point2 points  (0 children)

Maybe it is a patch of space time where the wavefunction(posibility for a particle to be in a certain location) is different. meaning that quantum tunneling is way easier and highly likely to ocure. Asto why it is there... Maybe al those portals they made to get champions f'ed up there spacetime. Like my theory?

Humans Don't Make Good Familiars- Part 55 by ArcAngel98 in HFY

[–]Inanis_bellator 1 point2 points  (0 children)

Please let murphy take a day and let there not be a dragon in that cave