Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
Bilou06: It means that checkio is not defined. when you "Run" a solution, checkio.org runs the code from the ...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
username724: Hi, I'm not an adviser per se, in that I suck at python, but I think I can answer part of your quest...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
nickie: For anyone interested in an explanation of this solution, see [my comment](http://www.checkio.org/mi...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
itsjunaid: thats my mistake ..when i opened it in the online editor it kept some old good along with this code ...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
DillonKo: I would have to see your code to know what your doing wrong. Send me a link on pastebin or dpaste. I...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
Bibiche: I had not seen it ! I like it very much ! Thanks. Maybe you should make it more visible.
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
gcolle: Thanks for your comment. I try to take good practices in python programming. Have a good day
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
Bibiche: Yes ! wonderfull !
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
Stepan: Yeah, thanks I fix my solution. And yes, there is no hidden tests. I mean test not included in task ...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
profuel_39643665ff7744e3bff926: I think, it's a bug, since they're state to show exact error. Notices: To get sum of digits in strin...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
bylijinnan: assert checkio('333') == '333' nice. Now i think my code is ugly...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
Bibiche: You are right. My solution is among the shortests.
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
Bibiche: Thank you. I like your solution too, as all your solutions, that I find clever.
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
Bibiche: doc={' ':0,'a':1,'b':2,'c':3,'d':4,'e':5,'f':6,'g':7,'h':8,'i':9,'j':10,'k':11,'l':12,'m':13,'n':14,...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
artem_shapovalov: if data.__len__() < 10 or data.isupper() or data.islower() or data.isalpha() or data.isdigit(): Вызы...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
Avaris: Isn't the calculator doing float arithmetic and flooring the *final* result? "After all calculations...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
papernode: TODO: Remove fixed TODOs.
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
PositronicLlama: OPEN_BRACKETS = {a for a, _ in BRACKET_PAIRS} I did use a set for efficiency. A set uses more memory...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
nickie: This requires O(N^2) time and has to go all the way. Sorry, but I don't think it should be the top v...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
Avaris: I agree that obfuscation kills development. But short doesn't mean obfuscated. I wrote this thing al...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
username724: def checkio(input_data): Dagnabit. I knew your solution was going to be more elegant than mine. ;-) ...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
grutte_pier: I don't agree at all with people saying the solution is not 'readable': learn your maths!
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
ignalion: 1. More than one pass through the expr 1. Hardcoded brackets 1. Replace method on a string is very i...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
username724: for variant in combinations(batteries, combination_length): While I agree with your sentiment, I am ...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
Bibiche: I adapted your solution to solve "Hexagon circuit". Thanks
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
rrevol: for variant in combinations(batteries, combination_length): I'm a bit disapointed that the best solu...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
MasterSergius: Pascal/Delphi and a bit of c++ I know - I don't guru of Python or programming at all )
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
nickie: Sorry, but I agree with Pavlo and veky. I can't believe that the current top-voted solution uses bli...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
veky: Just for statistics purposes: did anybody get the references (to Prince and Shakespeare) in the abov...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
veky: Just a few things to be aware of: * You should explicitly encourage users to look at other solutions...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
veky: Well, just 6 steps far from obvious. Still pretty plain. :-D Anyway, yeah, you're right in the secon...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
Avaris: dist = [distance(coors[p1], coors[p2]) for p1, p2 in zip(seq, seq[1:])] It's not exactly 'combinatio...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
macfreek: Of course, I couldn't resist trying this solution -- completely ignore the encrypted message, and ju...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
macfreek: (Repost, I wanted to write this earlier). It seems that the game ends as soon as a block remains on ...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
oduvan: Thanks for your feedback. We are still working on CheckiO and sometimes we are making some experimen...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
AndriusMk: if any(len(inset) == i for i in (0, 1, 2, 5, 7)): return 0 Yes, quite overdid it:)
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
Albin: I "like"d this for two reasons: 1) You've found a great way to address the points 2) Your solution i...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
toufalk: Thanks for two reasons: 1) I spent plenty of time thinking to this problem (and i liked it) so i'm p...
|
Nov. 23, 2017, 1:34 p.m. |
+ 1 |
for Comment
veky: I your grammar quite don't understand. :-P (NHF, I know English is not native tongue, but I honestly...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
ezimir: Thanks :) Of course I somehow missed this bit from the task description, which explains it all: > If...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
veky: I think I have managed to make it nonboring. I have a solution where FONT variable is bigger than th...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
veky: As the title says, I managed to write code that's shorter than FONT (by line _and_ character count)....
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
Khaled_SAB: ah, now I understand :) thank you
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
bunnychai: in task description, padding zeros are missing in captcha.png and example inputs...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
veky: Oh, then it's much more boring. :-P :-D
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
veky: > I have seen a lot of people on here bashing your code for it not being documented, or readable etc...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
Juge_Ti: You can get the general formula by using your transition matrix : Let m be the total number of pearl...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
htamas: > Cache will start work only when you call checkio **steps** times. No, it will work right from the ...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
htamas: Yes, basically it avoids calculating the same subproblem twice. When you call the decorated function...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
veky: Ladies and gentlemen, I present you... _the_ Solution. No recursion. No indexing. Branch pruning. On...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
nickie: Here's a decryption of veky's solution, for anyone interested to study it: from itertools import per...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
nickie: Explanation: 1. **remove** removes the first occurrence of 'x' from 's', assuming that there exists ...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
Soultaker: Nice and compact formulation of Dijkstra's algorithm. Would be even more efficient if `closed` was a...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
nickie: I suspect that this will be the top voted solution, so my two cents will go here. For this problem I...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
Juge_Ti: Thanks for your comment, I don't remember how I got the idea of this. I learnt the basics of Python ...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
Cjkjvfnby: I don't like string concatination via +, it is to bulky. Format (% or .format) are more readable. Li...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
aotus: I dislike the fact that this challenge rounds the angles to integer values. The angles of the 3-4-5 ...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
Lingson: Thats what I thought, but then I think there's a bug, because the only area that I've cleared 100% o...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
veky: Yes, that's it. I wrote the same thing, just compressed. ;-) Now when people ask me to explain my co...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
oduvan: Why don't we use this example as part of task description? :)
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
veky: Ok, enough time has passed, I think noone is still trying to figure it out. (If you do, spoiler aler...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
Sergey.Levandovskiy: OMG )! It so redundant and counterproductive Count will be executed and text.lower 26 times
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
veky: If you use Python for this stuff with huge data, then you have bigger problems. :-P Memoization is p...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
AndriusMk: Just a quick idea: it would be awesome to "mine" some modules :) Another related idea - it would be ...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
mogers: IIRC from school, those sentences are special cases and should be read as "the numeral _I_ can **onl...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
veky: This is my monster. ;-) checkio=lambda c,n:",".join(map("".join,__import__("itertools").zip_longest(...
|
Nov. 23, 2017, 1:33 p.m. |
+ 1 |
for Comment
ultras: tiny remark: because you are checking for the valid triangle, the third angle can be calculated as (...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
nickie: This solution is a simple **recursive DFS** and it would be much easier to understand if it was writ...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
veky: When you get the right idea (0..number times 2, group by capacity), it's trivial. How hard it is to ...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
veky: Yeah, good catch. But _why_ is it used here? :-) (It's not just aestetics.;)
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
zulqarnain: **NERD!**
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
nephi12: im sorry, but this does not work when i test it, and if i change the 0 to -1, than it is the same as...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
Cjkjvfnby: В данном случае можно организовать рекурсию без вложенного метода, это будет понятнее. [translate](h...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
veky: I felt a bit guilty about this, so I wrote another solution. It's basically the same algorithm (fetc...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
Amachua: In this task you have to return the maximum sum in a triangle. In the given exemple, you can find 17...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
Amachua: 1+3+3+5+3+2+6=23 It equals the orange path of the task description: https://static.checkio.org/media...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
DiZ: - Same remarks as bruykh: 1. you don't need to define variable *dash* => use **'-'.join(...)** direc...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
DiZ: I think main problem of sieving methods - excluding the fact you need an upperbound - is that you ha...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
rupadhya: Awesome visualizer for interactive python code. Checkout recursions. http://pythontutor.com/ .
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
ines: 1. No. Check task: > Input: An unspecific time string ( could be hh:mm:ss or h:m:s or hh:m:ss format...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
HonzaKral: I like the use of sets, I chose very similar approach, just started with a full set and kept subtrac...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
abhijit74: You need to check if the number is a square of prime numbers. 121 is the square of 11, thus not a pr...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
ciel: Because this problem requires "colder or warmer", start point is mandatory. Actually I firstly moves...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
PositronicLlama: Good point, I usually avoid doing this, but I forgot about 'all'. The builtins that I typically have...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
hamukazu: Sample code in StackOverlow really helped me. Actually before seeing that, I had no clue. Thanks.
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
sion: thx No : pat +=res[i] yes : pat += res[i] Is this correct?
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
veky: Yes. To defend my view: def makes a full-fledged Python function, that _does_ something -- possibly ...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
Cjkjvfnby: Then you need to use coinsort instead of Timsort :)
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
ines: @bryukh: Don't mess with hope :P @abhijit74: I think all of tasks in Home station could be solved wi...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
ysenko: It's really a good solution but I have a few minor comments: def checkio(map): it's not a good pract...
|
Sept. 19, 2016, 3:26 p.m. |
+ 1 |
for Comment
veky: I don't think it ever was documented. `formatter` was just a helping module for `pydoc`, a long time...
|
Sept. 15, 2016, 7:32 a.m. |
+ 3 |
for
Obvious-veky
|
July 12, 2016, 7:59 a.m. |
+ 1 |
for Post
Feature: Mission Modes
|
June 10, 2016, 7:07 a.m. |
+ 1 |
for Comment
Sim0000: In line 16, you need **(i)** after **text.count**. By the way, task description says "If you have **...
|
Nov. 8, 2015, 8:02 a.m. |
+ 1 |
for Comment
alexandr.zayats: Really helpful comment. Thanks a lot!
|
Nov. 8, 2015, 8:01 a.m. |
+ 1 |
for Comment
Peter.White: Great, had a good laugh.
|
Nov. 8, 2015, 8:01 a.m. |
+ 1 |
for Comment
Wulisso: I needed that laugh. Thank you.
|
Nov. 3, 2015, 8:27 a.m. |
+ 1 |
for Comment
koxmoz: I DID IT!!!!!! ajajajaj
|
Oct. 9, 2015, 5:56 a.m. |
+ 1 |
for
Eating Black Holes
|
Oct. 3, 2015, 4:24 p.m. |
+ 1 |
for Comment
jmegner: Thanks for being so helpful and also prompt in responding to things (pull requests, etc). It might b...
|