May 31, 2024, 9:33 a.m. |
+ 1 |
for Comment
StefanPochmann: This is impossible. Take your second example, the 3x3x3 cube. Remove any 1x1x1 subcube. The three vi...
|
May 6, 2024, 8:59 p.m. |
+ 1 |
for Comment
Evgeny_Andronov: +4
|
May 6, 2024, 1:54 p.m. |
+ 1 |
for Comment
StefanPochmann: Dictionary version :-) ```python def calkin_wilf(n: int) -> tuple[int, int]: result = {'1': 0, '0': ...
|
April 18, 2024, 7:37 p.m. |
+ 1 |
for Comment
StefanPochmann: Save two chars: ``` [x]+[0]*(x==0) [x,x][x!=0:] ```
|
April 1, 2024, 12:14 p.m. |
+ 1 |
for Comment
StefanPochmann: I've included them in the table and added a second table that integrates the `10**index +` from your...
|
March 24, 2024, 8:20 p.m. |
+ 1 |
for Comment
StefanPochmann: Lol :-). Yeah, the whole time I also thought you were already using `bit_length`. And your approach ...
|
March 24, 2024, 7:42 p.m. |
+ 1 |
for Comment
StefanPochmann: Yeah, I'm not exactly excited about mine :-). But at least I'm confident that it works, and that see...
|
March 24, 2024, 7:16 p.m. |
+ 1 |
for Comment
StefanPochmann: Ah, [new in Python 3.10](https://docs.python.org/3/whatsnew/3.10.html): > **Assignment expressions c...
|
March 24, 2024, 5:58 p.m. |
+ 1 |
for Comment
StefanPochmann: Another 2-liner :-P ```python beat_previous=lambda D,p=-1,c=0:[[p:=c] [c:=0]for d in D if(c:=c*10+in...
|
Jan. 20, 2024, 2:01 p.m. |
+ 1 |
for Comment
mildm: That is strange to me. You've used heapq for distance between mountains, but you adding 1 so you'll ...
|
Jan. 12, 2024, 9:02 p.m. |
+ 1 |
for Comment
kurosawa4434: I created the visualization script. Please check out the following: https://github.com/CheckiO-Missi...
|
Jan. 6, 2024, 7:48 p.m. |
+ 1 |
for Comment
amandel: Of course! I didn't read the specification correctly. Thanks!
|
Dec. 11, 2023, 10:09 a.m. |
+ 1 |
for Comment
oleg.sidorov.ds: I believe it should be 3 // 7, because we take 3 from stack first
|
Nov. 24, 2023, 2:05 p.m. |
+ 1 |
for Comment
Tapas_Kohad: spent months coding in c, 2 years learning python in free time as a hobby. didn't come to know about...
|
Nov. 3, 2023, 12:41 p.m. |
+ 1 |
for Comment
veky: Then do. 😉
|
Nov. 1, 2023, 2:49 p.m. |
+ 1 |
for Comment
flowerinapot: Beautiful
|
Aug. 26, 2023, 2:18 p.m. |
+ 1 |
for Comment
kudinov.feodor: nice codeblock of walrus expressions
|
June 21, 2023, 8:44 a.m. |
+ 1 |
for Comment
toranzocalderonjs: The function works as follows: 1) Consider **c**, and get the list of every substring not containing...
|
June 21, 2023, 8:44 a.m. |
+ 1 |
for Comment
Tinus_Trotyl: Yeah . . . all right :-)
|
June 17, 2023, 12:04 p.m. |
+ 1 |
for Comment
flowerinapot: Great solution, but the readability has decreased
|
May 31, 2023, 7:15 p.m. |
+ 1 |
for Comment
H0r4c3: Clear solution!
|
May 31, 2023, 7:15 p.m. |
+ 1 |
for Comment
LuckySmoke: Very interesting, I didn't know negative integers behaved like this with the modulo operator.
|
May 30, 2023, 7:40 p.m. |
+ 1 |
for Comment
TheRing: Ok, thank you so much for the explanation!
|
May 22, 2023, 6:15 a.m. |
+ 1 |
for Comment
LuckySmoke: So refreshing to see a solution without recursion. Recursion makes my brain leak out of my ears
|
May 10, 2023, 8:36 p.m. |
+ 1 |
for Comment
msol294: Pretty! But I think "len" instead of "set" would be better. For instance, 'abcd' and 'acbdaaaaaaaaa'...
|
April 29, 2023, 8:52 p.m. |
+ 1 |
for Comment
zlatabrain: This is very, very beautiful and creative. I like this!!!
|
April 25, 2023, 8:44 p.m. |
+ 1 |
for Comment
colinmcnicholl: What can I say? Great work. Your code certainly is creative. I find it incomprehensible. A detailed ...
|
March 28, 2023, 6 p.m. |
+ 1 |
for Comment
CDG.Axel: Ok, I saved one symbol ('>' instead of '!='). It looks like next code remains configurable for any b...
|
March 28, 2023, 11:37 a.m. |
+ 1 |
for Comment
CDG.Axel: Btw you can avoid 'tiles.remove' by changing comprehension tiles = sum(tiles, []) row = tiles.index(...
|
March 27, 2023, 8:53 p.m. |
+ 1 |
for Comment
CDG.Axel: Thanks for remembering sum(iterable, start). I forgot it again and wrote this: tiles = [e for line i...
|
March 20, 2023, 12:45 p.m. |
+ 1 |
for Comment
kudinov.feodor: Hi, you suggested pure geometric approach, which is really cool, just wanted to highlight that for m...
|
March 18, 2023, 9:36 p.m. |
+ 1 |
for Comment
StefanPochmann: Actually I tried it with bit operations now and it indeed became even faster (ran here on CheckiO): ...
|
March 18, 2023, 6:20 p.m. |
+ 1 |
for Comment
StefanPochmann: You could perhaps speed it up further by replacing the division as well. The results have alternatin...
|
March 18, 2023, 12:58 p.m. |
+ 1 |
for Comment
StefanPochmann: Nah, special case solutions don't count :-). Besides, my solution solves 2^3321929 in about 6 ms. Wh...
|
March 15, 2023, 6:54 p.m. |
+ 1 |
for Comment
StefanPochmann: Pfft, 10\*\*100 is nothing :-) Now waiting for you to come back with a 10*1000000 solution...
|
March 13, 2023, 8:07 a.m. |
+ 1 |
for Comment
amandel: Great idea! With this explanation I can see that you changed a Õ(n) calculation into a Õ(1) one. I s...
|
Jan. 27, 2023, 6:38 p.m. |
+ 1 |
for Comment
freeman_lex: Hello! You print in else statement) In real solution you should return in else statement as well.
|
Jan. 26, 2023, 12:05 p.m. |
+ 1 |
for Comment
Kolia951: This is genius! Thanks for explanation.
|
Jan. 26, 2023, 12:05 p.m. |
+ 1 |
for Comment
Kolia951: Are you using here complex numbers? Wow! How does it work!?
|
Jan. 26, 2023, 7:24 a.m. |
+ 1 |
for Comment
dig: Thanks for this info ☺️
|
Jan. 25, 2023, 3:14 p.m. |
+ 1 |
for Comment
dig: Very nice, using complex analysis!
|
Jan. 18, 2023, 8:08 p.m. |
+ 1 |
for Comment
U.V: This simulation of PQ is fine too. Interface to PQ in my mind is clearer then that of heapq. In prod...
|
June 27, 2022, 10 a.m. |
+ 1 |
for Comment
veky: Lines 7 and 8 can be much more easily written as data.setdefault((user, site), []).append(time) for ...
|
April 15, 2022, 11:55 a.m. |
+ 1 |
for Comment
Mylinear: I scrutinized your solution at https://pythontutor.com/ step by step to understand and after some ti...
|
Feb. 16, 2022, 11:04 a.m. |
+ 1 |
for Comment
CDG.Axel: can't handle myself :) def ugly_number(position: int, red=__import__('functools').reduce) -> int: re...
|
Feb. 9, 2022, 7:13 p.m. |
+ 1 |
for Comment
oduvan: The mission is in random-review mode. It will be shared in the coming newsletter. Usually, it is a c...
|
Feb. 6, 2022, 1:59 p.m. |
+ 1 |
for Comment
CDG.Axel: Current stats for task: Difficulty: Undefined; (exp.25); Vote:2; Attempted:46; Succeeded:33; Publish...
|
Feb. 6, 2022, 1:59 p.m. |
+ 1 |
for Comment
CDG.Axel: I'm trying to go through another secret summon method :)
|
Feb. 4, 2022, 7:33 p.m. |
+ 1 |
for Comment
Phil15: I get that it is blocked until enough people solved it. But 26 people solved it, and there are 29 so...
|
Feb. 4, 2022, 7:32 p.m. |
+ 1 |
for Comment
StefanPochmann: Enough *people*, or enough *accounts*? :-) At the two months mark I might test it...
|
Feb. 4, 2022, 7:32 p.m. |
+ 1 |
for Comment
StefanPochmann: Oh, actually the message says "enough solutions". That'll make it more convenient.
|
Feb. 4, 2022, 7:32 p.m. |
+ 1 |
for Comment
Sim0000: I also tried to solve it. Maybe it won't be published if the category is Polygon?
|
Feb. 4, 2022, 7:32 p.m. |
+ 1 |
for Comment
StefanPochmann: Is Polygon somehow special?
|
Feb. 4, 2022, 7:32 p.m. |
+ 1 |
for Comment
Sim0000: From what I've seen so far, the missions placed on Polygon are often experimental and not official m...
|
Feb. 4, 2022, 7:32 p.m. |
+ 1 |
for Comment
Phil15: From the top of https://py.checkio.org/station/polygon/ > Here we place missions which are testing o...
|
Feb. 4, 2022, 7:32 p.m. |
+ 1 |
for Comment
StefanPochmann: Maybe we need to use the [magic keyword](https://py.checkio.org/mission/the-most-frequent-weekdays/p...
|
Feb. 4, 2022, 7:32 p.m. |
+ 1 |
for Comment
CDG.Axel: Yep, I didn't mention @oduvan accidentally :)
|
Feb. 4, 2022, 7:32 p.m. |
+ 1 |
for Comment
Phil15: You can not move it or open access, only @oduvan can.
|
Feb. 4, 2022, 7:32 p.m. |
+ 1 |
for Comment
CDG.Axel: Think it's standard way for new task. @oduvan, what have I to do for move this task to another categ...
|
Dec. 3, 2021, 8:37 a.m. |
+ 1 |
for Comment
CDG.Axel: Sad that bitwise operation in python isn't fast ( from time import time n, st_time = 10000000, time(...
|
Nov. 29, 2021, 1:01 p.m. |
+ 1 |
for Comment
Phil15: _, size, split = distance[0] # smallest item without popping it split += 1 heapreplace(distance, (sp...
|
Feb. 16, 2021, 7:07 p.m. |
+ 1 |
for Comment
Phil15: I'm interested in creating (and solving) this. Python expressions are infix expressions but not nece...
|
Oct. 13, 2020, 7:18 a.m. |
+ 1 |
for Comment
r_tchaik: Well done!
|
Aug. 12, 2020, 7:15 a.m. |
+ 1 |
for Comment
ibonyun: Wow, very concise. I used basically the same logic but took many more lines to do it. Using `sum()` ...
|
July 30, 2020, 11:20 a.m. |
+ 1 |
for Comment
vincentvvasquez1: Not clear at all!!!
|
June 30, 2020, 10:44 a.m. |
+ 1 |
for Comment
Pouf: Right, I should have added "for the scope if this exercise". You are right in promoting fractions, d...
|
May 16, 2020, 1:31 p.m. |
+ 1 |
for Comment
veky: If you just tell us about the Sympy function, what is left for us to do? :-)
|
May 16, 2020, 1:31 p.m. |
+ 1 |
for Comment
Phil15: I must say that the scipy reference killed the fun of searching how to do it. Just remain to learn a...
|
March 17, 2020, 6:01 p.m. |
+ 1 |
for Comment
kurosawa4434: I added the random tests.
|
Feb. 7, 2020, 8:40 a.m. |
+ 1 |
for Comment
juestr: Clever, but it doesn't work either since in fact a list _can contain itself_: In [24]: l = [1, 2, 2,...
|
Sept. 30, 2019, 5:51 a.m. |
+ 1 |
for Comment
Phil15: I understand why you named it like this, but I would have called it "N-th permutation", it's clearer...
|
Sept. 27, 2019, 8:06 p.m. |
+ 1 |
for Comment
kurosawa4434: Nice math mission ! I can't design a mission like this. (I am not good at mathematics...) You should...
|
Sept. 27, 2019, 8:06 p.m. |
+ 1 |
for Comment
kurosawa4434: Thank you. Can I create this mission?
|
Sept. 23, 2019, 8:14 p.m. |
+ 1 |
for Comment
HeNeArKr: I am very grateful for your clever and interesting missions. I really appreciate the way that your m...
|
Sept. 20, 2019, 5:29 a.m. |
+ 1 |
for Comment
kurosawa4434: [Jack-o'-lantern](https://en.wikipedia.org/wiki/Jack-o%27-lantern) 🎃 I added the animation.
|
Sept. 19, 2019, 7:30 p.m. |
+ 1 |
for Comment
MrPod: Since Python 3.7+ [the insertion-order preservation nature of dict objects has been declared to be a...
|
Sept. 16, 2019, 7:33 p.m. |
+ 1 |
for Comment
Phil15: Amazing job as always. Solved and liked it.
|
Sept. 16, 2019, 7:33 p.m. |
+ 1 |
for Comment
Tinus_Trotyl: Splendid !!!
|
July 18, 2019, 6:11 a.m. |
+ 1 |
for Comment
veky: The task is nice, but input and output formats... :-o It seems CiO has begun to suffer from listoman...
|
June 17, 2019, 11:56 a.m. |
+ 1 |
for Comment
Leonix: Naah. Too hard of a task :D
|
June 12, 2019, 8:26 p.m. |
+ 1 |
for Comment
veky: Ah, distributivity: the cute way to write ' ' * (by + (index < to)) with only one pair of parenthese...
|
June 10, 2019, 7:57 a.m. |
+ 1 |
for Comment
svet: I suppose that 11th line is not necessary because pos is continuously increasing
|
May 13, 2019, 7:22 a.m. |
+ 1 |
for Comment
rodka81: Nice compact solution
|
April 24, 2019, 12:30 p.m. |
+ 1 |
for Comment
juestr: I admit I didn't test for negative ints, but the input is described as sorted by the first element, ...
|
April 12, 2019, 5:17 a.m. |
+ 1 |
for Comment
juestr: Very nice. In the if-branch **dice_number can be removed since it is known to be 1.
|
March 12, 2019, 6:08 a.m. |
+ 1 |
for Comment
Phil15: I would say this is more creative than clear (for merger and last line) but it's great that you do t...
|
Feb. 28, 2019, 7:36 p.m. |
+ 1 |
for Comment
colinmcnicholl: All local asserts including extra run through timeit, 3 repeats, 1000 times you code: [0.00851576969...
|
Feb. 25, 2019, 5:32 a.m. |
+ 1 |
for Comment
mplichta: never ever iterate list like that! it is not pytonic code! Do you like: def checkio(entry): filtered...
|
Feb. 21, 2019, 9:37 p.m. |
+ 1 |
for Comment
quarkov: Yeah, I see, my solution works improper. I will work with it. Could you say how this algorithm is ca...
|
Feb. 15, 2019, 12:29 p.m. |
+ 1 |
for Comment
Ylliw: Well, I did not verify that 2 rounds wouldn't be sufficient but it was looking obvious too me. Your ...
|
Feb. 7, 2019, 1:06 p.m. |
+ 1 |
for Comment
kurosawa4434: What about the intersection of a different brackets? remove_brackets('([)]') == '()' or remove_brack...
|
Feb. 5, 2019, 12:14 p.m. |
+ 1 |
for Comment
oduvan: I will make it public next week
|
Jan. 21, 2019, 8:48 p.m. |
+ 1 |
for Comment
fed.kz: Why do not use `lower` after `join` method instead of `map`?
|
Jan. 13, 2019, 10:40 a.m. |
+ 1 |
for Comment
Phil15: > I won't translate them all but a few one I hope.
|
Jan. 13, 2019, 10:38 a.m. |
+ 1 |
for Comment
vit.aborigen: Hope you didn’t write that turns manually :)
|
Jan. 1, 2019, 10:55 a.m. |
+ 1 |
for Comment
Phil15: Happy New Year 2019 to the whole CheckiO community! I learned a lot thanks to you all!
|
Dec. 5, 2018, 5:34 a.m. |
+ 1 |
for Comment
Dr__ON: +1, the same question
|
Dec. 5, 2018, 5:34 a.m. |
+ 1 |
for Comment
kirosx88: Why return self.health >= 0 ? seems like warrior still alive when he has 0 hp?
|
Dec. 2, 2018, 7:50 p.m. |
+ 1 |
for Comment
colinmcnicholl: Very good compact and also clear. IMO code would look better if you leave a single space either side...
|
Nov. 22, 2018, 5 a.m. |
+ 1 |
for Comment
fed.kz: You could replace the expression in a line 4: not (y < 20 or y > 40) in another 20 <= y <= 40 On exa...
|