8
dsethlewis
2 4 18
315/ 345
Last seen 3 years ago
Member for 8 years, 9 months, 16 days
Difficulty Normal
Best reviews / Newest reviews
Simulated-PositronicLlama 1
I gotta learn how to use itertools. This is the code I wanted to write when I made the mess I actually wrote. More
First-Elpicsida 1 1
Use another array for values and you can simplify the whole process. Also, think in terms of Roman Numerals, rather than decimal, to find a quicker solution. More
First-MMM_AAA_NNN 1 1
I tried to implement this, but I didn't know how to pull off your code in line 5. Creative! More
First-theitk
That's a lot of code on one line. Try to end each line by column 80 or so. The basic idea of looping through and unpacking the matrix into a 1D list and looking for streaks works, though. More
First-makoto_yamagata
Didn't know they added // in Python 3. I also don't know anything else about Python 3. More
First-knsh14
I like the use of ' '.join() at the end there. Well done! More
First-gmixo
Good idea to append SECOND_TEN to FIRST_TEN, since there's no reason they should be separate. Also, you've reminded me to just use %10 instead of int(number/10). You've got some redundancy on adding the units place digit, though. I think. More
First-jwing
Instead of using brute force, think about how you can funnel the number toward a form that can be processed easily. (For example, what would need to happen for 842 to be treated like 42?) More
First-mika04al
I think you only need to check the vertical condition for below the pawn in question, since pawns can only move up the board. Otherwise looks great! I like how you broke up the coordinates early to save yourself trouble later. More
Simple and clear-youngmiller
I had the same idea to use a ref list for the letters, so I'll pat you on the back, too. I just saw that we could do this using Unicode, though. Check out ord() and chr(). Also, it's best practice to avoid having errors, rather than using try-excepts, though sometimes you have to use that structure More
First-Kerulen
Only comment is that you should break the boolean statement up into multiple lines. More
First - This took me like 6 hours to do-dsethlewis
Geez. I re-wrote the algorithm like a billion times. More
ver clear-qler89
Nice! A lot shorter than my solution. Good use of list() and split() as shortcuts. Using first as the variable name for the list of people in first's network is a little confusing, though. Also, you can just write return second in first instead of the whole if-else statement. More
First-bryanandrade
Oooh, a whole new class. I thought about doing it since that's how I've done graph searches in the past, but it seemed like overkill. Would've saved me time, in retrospect. I basically used the same algorithm but built it from scratch inside the main method instead of doing it the smart way. Props! More
first with comment-yassai
You stuck to the basic simulation - well done! More
Roman numerals-stuqs
Think in terms of Roman Numerals instead of in decimal and you can find a simpler solution. Also, only use break/continue as a check for preconditions. Leaving them around like that can be dangerous for more complex programs. This is pretty good, though. Well done! Nice use of a dictionary! More
First-makstheimba
You had the right idea with making tuples for numbers and letters, but then did the subtractive values by hand! Oy! You could have saved yourself some effort there. Nice use of string formatting! More
romans_map-viktor.pecheniuk
I had the same solution, but with two arrays instead of a 2D tuple. I like this a lot, though! More
First-JulianNicholls
Ah, a while loop in a for loop! Nice idea. I put my for loop in my while loop, leading to some unnecessary iteration. More
First - Min and Max-AQiccl135
Beautiful! Simple, clear, quick. More
1
2