all stats

nurdle's stats

guessed the most

namecorrect guessesgames togetherratio

were guessed the most by

namecorrect guessesgames togetherratio

entries

round #34

submitted at
1 like

guesses
comments 0

post a comment


FizzBuzz.py ASCII text
1
2
3
4
5
6
7
8
n = 1
while n <= 100:
    r = ""
    if n % 3 == 0: r = "Fizz"
    if n % 5 == 0: r += "Buzz"
    if r == "": print(n)
    else: print(r)
    n += 1

round #33

submitted at
1 like

guesses
comments 0

post a comment


cool.h ASCII text, with very long lines (328)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#define Clear_The_Page          system("cls||clear");
#define Read_Me_The_Story 	    printf("\t:: \"%s\" by %s ::\n", story, argv[1]); {int i = 0; while (i < 65536 && story[i]) {i++;} for (i = i + 1; story[i] && i < 65536; i++) {printf("%c", story[i]);} printf("\n");}
#define Close_The_Book(reason)  return reason
#define Unknown_Author          1
#define All_Is_Good             0
#define Write_Me_A_Story        char c; int x = -1, y = -1; while ((c = fgetc(author)) != EOF) {{if ((57 >= c && c >= 48) || (71 >= c && c >= 65)) {if (x == -1)x = (c < 65? (c - 48): (10 + c - 65)) * 16;else {y = (c < 65? (c - 48): (10 + c - 65)) + x;x = -1;if (y == 8) --pen;else if (y == 255) ++pen;else {*pen += y;++pen;}}}}}
#define Check_It_Out            if (argc < 2) {printf("ws: no author was provided\n");Close_The_Book(Unknown_Author);}if (!author) {printf("ws: could not reach the author\n");Close_The_Book(Unknown_Author);}

/* hey, nurdle here!
 * warning to all aspiring codeguessers:
 * in the info page when they say "we don't bite" they are lying.
 * they have had incidents where they did in fact use their sharp teeth (especially back when they were allowed to roam around during the day, pre-87') to cause bodily harm
 * to several children attending the events at the pizzeria (Lyicly's Dinner).
 * I wish to remind you to KEEP ALL OF YOUR LIMBS A SAFE DISTANCE OF 30 CM AWAY FROM THEIR MOUTHS.
 * thank you and have a blessed day!
 */
docs.md ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# writeScript!

wS programs start with a 65536 byte long tape where every byte by default = 0<br>
wS programs are comprised of hexidecimal numbers (non hex characters are ignored), these represent addition<br>
NOTE: hex numbers `A-F` MUST BE CAPITALIZED, lowercase letters are for comments.
## Control Characters
 * `08` goes back to the previous character in the tape
 * `ff` skips to the next character in the tape
the first string represents the title of the book, while the second string represents the contents of the book.<br>
the title and contents of the book are seperated by null characters.
```wS
41 00 42
```
this book would be titled "A" (which is 41 in hex) and its contents would be "B" (which is 42 in hex)
## Running The "Emulator"
compile the `ws.c`, and then run it using the format below
```bash
./ws (filename)
```
example.ws ASCII text
1
2
47 65 6C 6C 6F 20 51 6F 72 6C 64 21 00   name of book
47 65 6C 6C 6F 20 51 6F 72 6C 64 21 00   contents
hotdog.txt ASCII text
1
2
3
4
5
6
why cant i say everyone is lyingly? what is up with that? another err 500? another err 404? another err in general?

the anonymous is rigged to target new CGers in every way, therefore you should use it so that it isnt rigged.


this code was not written by me, however someone probably did
ws.c ASCII text
1
2
3
4
5
6
7
8
#include <stdio.h>
#include <stdlib.h>
#include "cool.h"

FILE *author; char story[65536] = {0}; char *pen = story;

int main(int argc, char **argv) {
	author = fopen(argv[1], "r"); Check_It_Out; Clear_The_Page; Write_Me_A_Story; Read_Me_The_Story; Close_The_Book(All_Is_Good);}

round #31

submitted at
5 likes

guesses
comments 0

post a comment


cg31.zip Zip archive data, at least v4.5 to extract, compression method=deflate
dir cg31
dir IO
input.txt ASCII text, with no line terminators
1
100000000
output.md ASCII text
1
2
# Monsexevensunsexmonsexday 
* meet with Zero
dir libs
dir __pycache__
base6.cpython-39.pyc Byte-compiled Python module for CPython 3.9, timestamp-based, .py timestamp: Thu Jan 26 20:23:35 2023 UTC, .py size: 444 bytes
1
cg: couldn't decode file contents
num_names.cpython-39.pyc Byte-compiled Python module for CPython 3.9, timestamp-based, .py timestamp: Thu Jan 26 20:23:35 2023 UTC, .py size: 743 bytes
1
cg: couldn't decode file contents
base6.py ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import math

# turn base6 into standard integer
def m(n: str):
    # setup
    m = 1
    numerals = "012345"
    n = n[::-1]
    x = 0
    for i in n:
        x += numerals.index(i) * m
        m *= len(numerals)
    return x
# turn integer into base6
def x(n: int):
    i = 0
    x = ""
    numerals = "012345"
    y = n
    while y > 0:
        x += numerals[y % 6]
        y = math.floor(y / 6)
    if x == "": return "0"
    return x[::-1]
num_names.py ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# the names of numbers
d = {
    "423": "y",
    "69": "funny",
    "49": "wedne",
    "20": "satur",
    "13": "devil",
    "12": "dozen",
    "11": "leven",
    "10": "deca",
    "0": "zero",
    "1": "mon",
    "2": "tue",
    "3": "thur",
    "4": "four",
    "5": "fri",
    "6": "sex",
    "7": "seven",
    "8": "octo",
    "9": "sun"
}
# get the name of the numbers
def getName(num, plural=False):
    n = str(num)
    ret = ""
    i = 0
    while i < len(n):
        for ii in d:
            if n[i:].startswith(ii):
                ret += d[ii]
                i += len(ii) -1
                break
        i += 1
    if plural: return (ret + 's').replace("fris", "fries").replace("ys", "ies").replace("xs", "x")
    else: return ret
main.py Unicode text, UTF-8 text, with very long lines (350)
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# // Code by SoundOfSpouting#6980 (UID: 151149148639330304). // Code by
# SoundOfSpouting#6980 (UID: 151149148639330304). SHUT THE FUCK UP. Like,
# wow. Jesus f-ing christ. I can't TAKE IT ANY MORE. All you esolangers
# think you're soooo funny, huh. Laughing at people who don't get your
# silly little injokes. // Code by SoundOfSpouting#6980 (UID: 1511491486
# 39330304). What the fuck does that even mean?? Huh??? It's not funny! A
# joke is supposed to be funny, not some weird string of random words that
# doesn't even make sense! I'm sick and tired of these elitist shmucks
# thinking they own the whole place just because they laugh at // Code by
# SoundOfSpouting#6980 (UID: 151149148639330304). Oh I'm so smart because
# // Code by SoundOfSpouting#6980 (UID: 151149148639330304). Oh I'm so
# cool. Ha ha ha. Well you know what, I can laugh at it too. HA HA HAHAHA.
# I'm laughing at how PITIFUL and DERANGED you people are. That's the
# joke. That's the real funny part about // Code by SoundOfSpouting#6980
# (UID: 151149148639330304), that anyone would stoop so low to ever make a
# joke on how a discord tag is suddenly the peak of humour. Get a grip,
# you losers. // Code by SansOfUndertale#0413 (UID: 403033936841941151).
# Hardyhardyhar.
import libs.base6 as b6
import math
from libs.num_names import getName
import time

unsolvable = "```\n....................../´¯/) \n....................,/¯../ \n.................../..../ \n............./´¯/'...'/´¯¯`·¸ \n........../'/.../..../......./¨¯\ \n........('(...´...´.... ¯~/'...') \n.........\.................'...../ \n..........''...\.......... _.·´ \n............\..............( \n..............\.............\...\n```"

def main():
    # setup
    out = open("IO/output.md", "w")

    # get the input
    friends = open("IO/input.txt", "r")
    friends = friends.read()
    # split the list
    friends = friends.split("\n")
    # this is to prevent an error from occuring if the user gives invalid input
    try:
        # get the value of the numbers provided (the days that friends are available on)
        friends = [[b6.m(ii) for ii in i.split(" ")] for i in friends]
    except:
        # flip the user off
        out.write(unsolvable)
        # close the output file
        out.close()
        print("woops! input must be in seximal (base 6) (only 0,1,2,3,4,5 are allowed)")
        # end the program
        return
    friend_count = len(friends)

    # map out the days, this is to get rid of days that no one is available for (provides large preformance boost)
    day_map = []
    for i in friends:
        if not i in day_map:
            day_map.append(i)
    # sort the map from earliest to latest
    day_map.sort()
    day_count = len(day_map)
    
    # get the number of days each friend is available for
    p_o = [len(i) for i in friends]
    p = 1

    # count the number of possible schedules/combinations
    for i in p_o:
        p *= i
    # if the amount of possibilities is 0 then it is unsolvable and therefore the program will flip you off
    if p == 0:
        # flip the user off
        out.write(unsolvable)
        # close the output file
        out.close()
        # end the program
        return

    # setup
    i = 0
    # this loop will run through every possible variation and try to find one that doesn't require two friends to occupy the same day
    # if it can't find a solution it will flip you off
    while i < p:
        # setup
        days = [-1] * day_count
        ii = 0
        g = i
        fail = False

        # check the current variation
        while ii < friend_count:
            # unexplainable dark magic that selects an available day of one of the friends
            x = g % p_o[ii]
            
            # check if the selected day isn't already taken by another friend
            if days[x] == -1:
                days[x] = ii
            else:
                # if it is taken then we know this combination won't work, so move on to the next combination
                fail = True
                break
            
            # some more unexplainable dark magic that is required for this system to work
            g = math.floor(g / p_o[ii])
            
            ii += 1
        if not fail:
            # setup
            export = ""
            ii = 0
            while ii < day_count:
                # name for the day
                day_name = getName(day_map[ii], plural=True)
                day_name = day_name.capitalize()
                friend_name = getName(days[ii])
                # make friend 1's name and 2's name sound cooler
                friend_name = friend_name.replace("tue", "thue").replace("mon", "mono")
                friend_name = friend_name.capitalize()
                
                # format it into readable markdown
                export += "# {0}day \n* meet with {1}\n".format(day_name, friend_name)
                
                ii += 1

            # write to the file
            out.write(export)
            # close the output file
            out.close()
            # end the program
            return
        i += 1
    # if the problem is unsolvable, the program will flip you off
    # flip the user off
    out.write(unsolvable)
    # close the file
    out.close()
    # end the program
    return
start = time.time()
# error "handling"
try:
    main()
except Exception as e:
    print("there was an error")
    raise Exception
delay = round(time.time() - start, 3)
print("program finished ({0}s)".format(str(delay)))