#dev-general
1 messages ยท Page 88 of 1
whats with the number on the first line
I know what this is
^^^^^
i think
i thought it was just the average
its not?
got em again bm
๐ฆ
Lmao that was easy
you're literally the same time as me smh
lol
halp
My tests worked but I got 0%?
https://img.bristermitten.me/20.11.57-2020.png we just need scala and groovy now
Kali, sum / N
yeah?
I meant Kali
wait wtf
the MEAN?
yes
again, pls don't spoil while others are still doing this
ye
import statistics
print(statistics.median(input()))
that returns 5?????????
๐ค
read up
You shouldn't be looking here if you're still solving it smh
frosty share code
smh
33.3333333333333 ๐
(1/3) ^ 4
no
I like these ones
lesser
Well, less
My shitcode lol
Sx, if they aren't some tricky shit they're nice
for some reason I can't do this lol
ok the game is broken apparently lmao
Lukas, share code
but is it possible that they provide some shitty templates that are just to confuse me? mine just made no sense imo
use java bardy ๐ XD
how do I convert that second line to an array?
you're already looping it
I was in a hurry so I just put some thing together to make it work somehow lol
just add it all into a var
Something is wrong I guess, my tests passed but I got 0% and @light leaf got something wrong and has 100% ยฏ_(ใ)_/ยฏ
no
I would imagine yours is wrong because you output a double
but there are cases where it must be a double
So, as I asked, are these predefined things to confuse me?
how?
double didn't work for me lol
It has to be an int in this one
double worked but now I have 0%
well that's the advantages of a dynamically typed language there lol
they were all int?
int didn't work
doubles are usually specified preemptivelly
I just used division and didn't care
Some were double tho?
some were yeah
Not today KM?
My test cases were all ints
One of them was like 655.5 iirc
one of my results was 5.5
yeah
and you also got like a million brackets well that's the advantages of a dynamically typed language
Wait are everyone's tests different???
No
Wait are everyone's tests different???nope
That wouldn't make sense if they were
Ye the 5.5 was the only double one
But you weren't using a var for that
So probs why noone noticed
and you also got like a million brackets
well that's the advantages of a dynamically typed language
@old wyvern literally just two parens more than you if you disregard the boilerplate
i'm really confused now
everyone here?
I think so
Yes
starting
yeah that one seemed to have some problems
I don't get it too wtf
i got it
so theres the same amount of men, wives and kids?
that code is really short
well yeah
if that clarifies things a bit
ty ty
so it's not just x * x * x
||SPOILERS||
spoilers.....
there ya go
ew...
but wtf was that
This is why I dont like math
they all have a harem or what
no idea
xD
yeah i've got 3 wives and 9 kids
That was interesting..
๐
finally a challenge I knew how to do lol
Everyone got their own harem jesus fuck
xD
Oh guys. I just wanted to use x^2
everyne is everyones X
Yugi, that's yikes
xD
But I didnt't thought about that's a logical XOR haha
everyone got it now?
x=int(input())
print(x+(x*x)+(x*x*x))
in python that's literally it lol
yeah
But I didnt't thought about that's a logical XOR hahaI was doing (x * (x+1) * (x+2))
I read it as there's X men, which have a wife, with X children at first..
Opera man
yeah
smh
umm
I'm installing arch linux at some point hopefully today
Hehe r3kt
done
what
Thats not even right?
how is mine wrong
Its a * a - a
No?
you put 1
it's the same thing
if these were shortest I would've won again lol
I put a * (a - 1)
^
64 * 64 - 64 = 64 * (64 - 1)
Oh, I'm dumb
you don't need brackets since multiplication comes before subtraction
I didnt read the parentheses
I forgot the brackets...
I divided in a calculator the sample cast
you do need brackets for mine
lol Yugi
you didnt @spring canyon
Brackets
Indices (powers)
Division
Multiplication
Addition
Subtraction
i wasnt doing it backwards
im lost
i did it forwards....
That's why it took me so long @gentle coyote
wtf is this supposed to be
Ah
n * (n-1)
(* x (- x 1))
oh
you need brackets
yes
no ya don't
you need brackets
look at my code
otherwise it would be (n * n) - 1
You need
bod mas
you do lol
I did x*x-x
oh wait
Theyre doing - 1 before the multiplication
wtf is bidmas
Python is weird
instead of minus x
if you do it like x * x - x You don't
yeah
otherwise you do
x * x - 1 wouldn't work
^
That's what I just said
No, it would not
also whats I in bidmas?
wasnt it bodams?
Indices @old wyvern
exponents
ogh
^
bodmas*
Johny you got this?
it was until you got to year 7 @old wyvern
is what we were taught
theyre the same thing
idk
bidmas and bodmas are the same
I wasnt thought that further
^
clojure is so ugly
^
O in BODMAS is of
no
I in BIDMAS is indices
you're wrong
so BIDMAS is the correct one
I wasnt taught that
literally the ugliest shit ever
the O in BODMAS is orders
Indices aren't just powers
just like postfix
Fuck is BODMAS
how is this readable....
Why is this even an arguement
@prisma wave wasn't taught that lol
oh wait, its not postfix
prefix
the high council has decided that your opinion is invalid
postfix?
2 more players to join
postfix is an SMTP server lol
@hot hull order of operations in maths
comon boys
I'm in
starte
also where are the shortest challenges?
BIDMAS = Brackets, Indices, Division, Multiplication, Addition, Subtraction
idk this 1 lol
yep
alex..
WHAT
what
USE REPEAT DAMMIT
rip
Rekt Yugi
Share code @lunar cypress
oi
how tf did i mess that up
What happened
I have sexier loop
You were faster cause I was watching overwatch videos
@hot hull
LMFAO
xD
The fuck is that loop lmao
uh oh
I've never seen that used before
oh the idiot thing didn't read the new line
and it makes perfect sense
the infamous down to operator
That's trippy af
that's actually genius
No its not
well not really
hold on
my thing is correct
Johny
Apparently not
Noone knows cause you're using Clojure
I have literally the semantic equivalent of what bm did
xD
the website says otherwise
the website has had a couple of problems with clojure in the past
I'll try this in my repl
Like what the hell even is that..
yuck
nah wtf
clojure is a strange language
how do you do that?
You just loop the input
ah okay
as many times as the number is
not really something you can do that efficiently in Python
also where are these shortest challenges?
or are we not doing those
idk
2 players left to join
hey guess what it works in the repl
maybe just luck
I thought it was random chance
brdy join
Now that you're using python the chance is gone
I am Yugi
man why am i doing this and not practising instead ๐
okay I'm in
how does one read
@old wyvern by knowing lisp
What?
hmmm
WHAT
this is practice @onyx loom
not when u dont know โน๏ธ
||if expression + modulo operator||
What the heck
62% gang ๐
how people getting 62%
whats modulo
tf
We all did the same thing
probably not the most efficient
Um what?
This challenge was weird
@onyx loom %, it returns the remainder after division. eg 3 % 2 is 1
its speed?
How did @gentle coyote get 100%
anyone know how I can make my code better?
That's some kek
@prisma wave that I don't know
System.out.println(N % 4 == 0 ? "AAAAAAAAAA!!!": "Ok" );
Im.... so lost...
Am I missing something or?
you made sure to print "Ok" if it's not divisible by 4 right?
okay
now you're complaining
broken
and then the exact string it asked for
clojure is still bad
wrong
use BigInteger
@onyx loom you can use modulo to check divisibility (eg if n % 2 ==0 then n is divisible by 2)
idk maybe
go's int is an alias for int32 though?
wait...
Correct Sxtanna
so it shouldnt have been able to parse if its too large as well
were we supposed to do nextLong or something?
random test cases
BigInt
Use BigInteger
everyone did
Too big for the JVM's int apparently
ffs
yes
how tf did I get 100% though and you guys only got 62%
and I did not care because dynamic language ๐
python numbers are different ig
the number was too large?
Why doesnt it show the cases?
that's my code lol
yeah all the jvm people got 62%
Ours should be fine as well then..
No
no
All other languages are 64 bit by default probably
@prisma wave
except you
not go
Ew
boi
the superior jvm lang got 100%
python doesn't really give a shit about number size
@prisma wave ๐ฆ
Fuck you java
imma head out, cu next time guys
ok cya
Clojure and Java
Bye
cya
bye
cya
cya

that was lowkey bs
i'm not confident enough with any other language
it was high key bs
well gotta read the instructions
youre supposed to be able to trust the input
yeah
I love how I'm the only one here using python lol
I love how I'm the only one here using Go
they could've at least done nextBigInteger in the template
it said right in the instructions how big the input was going to be
I mean tbh, you should've known the max int value Sx
I love how we have a java gang
So jokes on you
@lunar cypress it generated the code though
yeah
Since you're provided the max number it can be as input
you should only need to worry about the logic
You shouldnt have to change the generated code
not anything else
don't think I got in that one
๐ฆ
DAMN YOU OPERA!!!!!!!!!!!!!!!!!!!!!!!!!!!
or maybe it's just my PC that's slow
LOL
I'm a spectator so I can't see
rip
gotta go with some good old anti-DRY sometimes
I'm still confused on where tf these shortest challenges are at lol
probably lol
what was the challenge?
where's matt
ipsk
count how many times a few letters were inputted
count dna proteins
Aren't these shortest challenges a little bit unfair?
@jovial warren how many A T C and G in a string
Oh shit i forgot i joined
A CG T
this was time not shortest
it doesn't read my output..........
Oh yeah true
My solution is so bad xd
yeah mine too
it doesn't read my output..........
Again?
let me share my code
System.out.println vs print for example
Badjure
in python I think I'd just do something like print(input().count())
......
How do I leave? I didn't mean to join in xD
Just don't join next I guess
just close it ig
^
^
submit anything
even ive joined ๐
xD
just submit matt
I gotta leave in a sec, was just checking in
I know it's fun ;p
@spring canyon that's hideous
Oh yeah nice ty
s.length() - s.replace("A", "").length()wut/ xD
๐ฌ
good move tbh
ok as it turns out there is one particular form that it doesn't like
which is doseq
I've no idea..
strange
@hot hull count the chars in the string
so what were those chars again?
as separate letters?
those are not proteins
pretty sure they are
^
it's the base pairs in dna or smth
yup
x=input()
print(x.count('a')+x.count('g')+x.count('c')+x.count('t'))
in python I think
where does it say that it's a protein? that#d be new to me
Proteins are made up of a series of amino acids. Nucleic Acids (RNA and DNA) are made up of a series of nucleotides. The center of an amino acid is the carbon bonded to four different groups. ... A nucleotide is composed of a five-carbon sugar, a nitrogenous base and a phosphate group.
oh yeah fair point
is nucleotides protien?
No shit KM
dna > RNA > proteins
it's Deoxyribonucleic acid @lunar cypress , you should learn about it in science lol
iirc
DNA is not 2 RNA strands right?
no
don't think so
mhm
i did triple science and cant remember shit ๐
RNA is made by a cell as a kinda messaging service I think
yeah RNA is made to code for different amino acids iirc
yeah MRNA = Messenger RNA
which then make proteins
MRNA is used to transport DNA sequences I think
but a nucleine base is not a protein
frosty
way too much bio
I give up
๐ฆ ok
I almost got it
rip
This auto completion is fucking annoying
use IJ
and please wait for the opera loading time this time @old wyvern ๐
ctrl shift a
scratch
thats what im doin
IntelliBro
okay I'm in
it might be cheating a lil but its good xd
2 more nibbas
nah not cheating
opera takes ages lol
DONT USE OPERA
I'll probably be using waterfox on arch
2 more peeeeps
I'm moving to arch in a bit
Next game I'm gonna open IJ KM
sxtanna
waterfox?
it's a fork of firefox @prisma wave and it's super lightweight
@spring canyon join
hmm
I use intellij when i need a functions name quick xD
sx and das
Yes
binary?
nvm
chrome using your CPU and listening in over your microphone is just too good eh?

BRUH HOW DO YOU DO A BITWISE NOT IN KOTLIN
wait what
inv
ty
I am actually so dumb
this was such an easy win
and I typed the wrong function
ffs
oh nvm
wait
had to do more that I missed anyway
this is more complex than it seems
Y'all are bad lmao
yeah I got greedy there and didn't actually think
frosty share
It's legit just replacing 0's with 1's and 1's with 0's
........bro
kek
print(~int(input(),2)) why tf does that not work
weird one
~ is the python bitwise operator for complement
Yugi, nice number
xD
lmao he waited for it ๐
I'm confused as to how BM hasn't gotten it already..
tf am I missing?
me too tbh
why does that return -1?
Wait whats up with the number?
it's not as simple as just flipping the bits
apparently ~0 = -1
Yugi, have you heard of spaces?
ah I need to convert it back to binary?
UsE tHeM
what spaces?
char c:B.toCharArray()
wtf is that abomination bm
char c : B.toCharArray()
no bardy. when compiling itll convert to binary for u 
loop over chars and replace bm
wtf
xD
that's what I did in the end
print(~int(input(),2)) still can't figure out why that doesn't work
but it's not very nice
@jovial warren think for yourself, you see your output
wait this is signed isn't it
whaaa
yeah
I should've taken my time
This was the last one for me, pce
cya
bye
ciao
@gentle coyote Sorry, I was afk
so am I supposed to use OR rather than complement?
bardy is left
I can't figure this out
1s complement
may somebody look over my code and tell me whats wrong holy god
u guys are slow. it only took me 27 seconds
If you do without string replace the result may have more characters
Did anyone configured the site so you can code in your IDE?
func main() {
var B string
fmt.Scan(&B)
i, _ := strconv.ParseInt(B, 2, 64)
fmt.Println(fmt.Sprintf("%b",^i))
}
And I'm pretty sure that has to work wtf
luka
fuck it
result may have more characters than input
I'm done
wait what
there has to be a simpler way than string replacement
I am
oh opera
again, opera loading speeds
I'm switching to arch linux maybe after this game
๐
and not chrome no
CHROME
why?
- because it listens to you
- because it eats away at my CPU
Edge ftw
bEcAuSe DaTa
because it listens to youok?
i wouldnt be surprised if MS listens too
chrome listens to your microphone input and runs it through a speech to text engine then uses that data to personalise ads
so whats the point
it did when I used it before
its only RAM it eats
RAM then
chrome listens to your microphone input and runs it through a speech to text engine then uses that data to personalise ads
@jovial warren nonsense
you want proof?
Finally
sure
again?
Shortest โค๏ธ
lol
Follow up video: https://youtu.be/kv8gvXPwWjY
Does Google and Facebook listen in and record conversations and audio even when they're not open? I perform a live test using Google chrome on a Windows 10 PC to discover whether my microphone appears to be recording me even when ...
you call that "proof"?
we gotta talk a little about science, mate
I know that video
This is not proof in any way
cya
Ngl, this was fun. We should do it more often ;)
ill start joining them once i sort of know what im doing :)
I tried too lol
xD
holy shit bm I'm squeezing out the last whitespace here to beat you
bruh
lmao
xD
i used multilines dude
nooo
feels embarassing
2 characters
lol
int main(){string DNA;cin >> DNA; cin.ignore();string res = "";for (int i = 0; i < sizeof(DNA); i++)switch(DNA[i]) {case 'A':cout<<'T';break;case 'T':cout<<'A';break;case 'G':cout<<'C';break;case 'C':cout<<'G';break;}}Pro gamer move
2 more actually
could've you let out the newline johnny?
yeah
Too many spaces Yugi
def r(d):
c={'A':'T','C':'G','G':'C','T':'A'}
return ''.join([c[b] for b in d[::-1]])
print(r(input()))
tf why doesn't that work?
Well, Java is just to long xd
and it's really ugly too
xD
Imagine not being able to use a map as a function
imagine
Imagine using Clojure
bruh 72 characters
you wanna see this code?
WHAT
tf
wait really???
actually cheating holy crap
import string
t=str.maketrans('ATGC','TACG')
print(input().translate(t))
that was nasty
omg
pyHacks
that took some work
may or may not have spent most of the time googling that
that method is a joke though
bardy fast
10 sec.
I'm trying
FUCKING OPERA
give me a thumbs up if you think that method I used was complete bullshit lol
Okay ye this ain't possible on mobile
๐
I knew python would come in handy at some point lol
man why does clojure's join function have to be in a different namespace
lol
I just realised I'm dumb for using list comprehension all the time
I could just do (repeatedly n read)
lol
smh
is there something necessarily wrong with using global variables? i understand in bigger programs, but in a smaller program is it all that bad?
You can sort Arrays in Java? wow, nice
mhm
Aaaand I totally forgot about String.join()
same
@onyx loom not particularly, but it's something that should be avoided whenever you can
im just lost guys
https://img.bristermitten.me/21.30.28-2020.png I finally did that previous one without any String#replace
That's not better tbh
not really lmao
alr ty bm
but it's a proof of concept
what was the challenge?
oh fuck off
alright just shitcoded my stuff again lol
this one was sorting an array of ints @jovial warren
which is surprisingly hard with just numbers because of signed integers
sort.Ints(vals) lol
ascending order
ah okay
so nothing special
array.sort()
share @gentle coyote
was the input an array?
the input was like ```
5
1 2 3 4 5
yeah python's not gonna like that
did frosty leave?
they're on mobile lmfao
welp
rip
gimme another array one
I swear I should make a language built for these things
like a language where keywords are like single letters lol
lmao
readability=0, compactness=9001
everyone ing?
yeah think so
p(rln().arr().sort().str())```
is it me or does the current question make no sense with the example
also you remember my 72 chars one
import string is useless
since it's built-in in python 3
so it should've actually been 72-13=59
lol

20 * 10 = 120??? what maths is this
new pfp 
how tf do I get to the third line of an input in python? tf?
Idk what this is about, but just multiply it by a random number between 0 and 1
Look at the example
ยฏ_(ใ)_/ยฏ
why can't this just input "20 10" like a normal person
wait wtf
Well, I thought that this is Fastest lol
20*10=120?
no lol
???????????
๐
