Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for bastolski‭

Type On... Excerpt Status Date
Edit Post #283779 Initial revision over 3 years ago
Answer A: Make $2 + 2 = 5$
[Python 3], 24 bytes lambda x,y:x+y+(x==y==2) Try it online!
(more)
over 3 years ago
Comment Post #283753 (n-1) --> ~-n for 40 bytes
(more)
over 3 years ago
Comment Post #279338 I don't understand how "\ \ \ \ "*a works. When i try : print"\ \ \ \ "*3 i have this : \ \ \ \ \ \ but somehow your code returns \ \ \ . I'm missing something lol (do not pay attention to the spaces between \ )
(more)
over 3 years ago
Edit Post #283302 Post edited:
over 3 years ago
Edit Post #283737 Initial revision over 3 years ago
Answer A: Roll n fair dice
[Python 3], 61 bytes lambda n,m:sum(randint(1,m)for i in[0]n) from random import Try it online! This is not an interesting answer as it is just a copy of your code. I tried to do it with choices but it's 1 byte longer : Try it online!
(more)
over 3 years ago
Edit Post #283714 Initial revision over 3 years ago
Answer A: In The Jailhouse Now
[Python 3], 74 bytes lambda n:"╔"+"╦"(n-3)+"╗\n"+("╠"+"╬"(n-3)+"╣\n")(n-2)+"╚"+"╩"(n-3)+"╝" Try it online!
(more)
over 3 years ago
Comment Post #281806 Hi! Is it me or your link is not working ?
(more)
over 3 years ago
Comment Post #282290 [118 bytes](https://tio.run/##HYxBCsIwEADvfUUoCFkbIVE8pfEjyx6CTXUPbkOagr4@VmFgmMvkT30ucmktBkQyf6iT4Hx6p7vup7BuL81qXopixaJKlEfSzgjwrOTAo4OT@IiIzpwJp9GSsbtvlmgIYrwM@6w/slTNkreqAaDL5dcRWnPXLw)
(more)
over 3 years ago
Edit Post #283302 Initial revision over 3 years ago
Answer A: Merge two strings
[Python 3], 82 81 bytes lambda a,b:[a[:i]+b for i in range(len(a)+2)if i>len(a)or b[:len(a)-i]==a[i:]][0] Try it online!
(more)
over 3 years ago
Comment Post #282290 <a href="https://tio.run/##TY2xCsMgFEVn/QqXgI@4SLvUxvxIyaDGtA/aFzFm6NfbWCh0OdwDB256l8dKp1q9vU3X0OAO8GXNggSSyI7uUWqFVCRS2osE6DUYzma77S@JoqX4nxLgIqjDQQNnx5xHMq63pDiLz@YDGf/zLZrw3Sm3C6eC8lDr@fIB" title="Python 3 – Try It Online">141 bytes</a>
(more)
over 3 years ago
Edit Post #283142 Initial revision over 3 years ago
Answer A: Diagonalized alphabet
[Python 2], 61 bytes i=12;exec"print'YWUSQOMKIGECABDFHJLNPRTVXZ'[i:14+i];i-=1;"13 Try it online! I tried to do it without writing the full list 'YWUSQOMKIGECABDFHJLNPRTVXZ' but couldn't get less than 61 bytes. Do not hesitate to give me advice :)
(more)
over 3 years ago
Comment Post #283132 Thanks ! Didn't know i could do that :)
(more)
over 3 years ago
Edit Post #283132 Post edited:
over 3 years ago
Edit Post #283132 Initial revision over 3 years ago
Answer A: It's Hip to be Square
[Python 3], 20 19 bytes lambda n:n.5%1==0 -1 byte thanks to @shaggy : 0.5 -> .5 Try it online!
(more)
over 3 years ago