[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor application acceptance emails are being sent out. Please remember to check your spam box!


[Advertise on 4chan]


File: dook.png (47 KB, 350x348)
47 KB
47 KB PNG
>Everybody Codes is a free space for honing your coding skills, experimenting with ideas, and learning from others. At its heart lies the belief that programming is best when shared - whether through solving puzzles, streaming your progress, or discussing solutions.
https://everybody.codes

Similar to Advent of Code but in November. Puzzles drop at 4PM EST with weekends off

>oh no I started late
Can sort leaderboards by "local time" which doesn't start the clock until you open the puzzle. Not used for global ranking but still fun to be able to compare how you did

/g/derboard code
4151e976-7b9f-4fda-bb33-fa7c70fdceea

Last: >>107096381
>>
cringe logo
>>
Been using ai to do mine and I'm high on the g board
No one can stop me
>>
>thought I did good today
>global rank double from yesterday
well shit
>>
Does this continue into December? I think eric watsl is a cunt and hate his stupid puzzles and want someone else to overtake his stupid AOC series.
>>
>>107127636
no, it ends on nov 28
>>
>>107127636
nah ends at the end of november
>>
>>107127636
AOC is dying naturally anyway, down to only 12 days and he killed the global leaderboard
>>
>>107127644
>>107127648
ok thanks bros, probably intentional to avoid competing with the popularity of it.
>>
>>107127651
but what am I supposed to do Dec13-25? Just get drunk alone?
>>
File: water.png (12 KB, 1048x119)
12 KB
12 KB PNG
reminder that you're literally killing a third worlder if you get filtered
>>
>>107127670
/a/utism christmas stream
>>
File: ec2025-04.png (82 KB, 580x579)
82 KB
82 KB PNG
>>
File: file.png (34 KB, 898x338)
34 KB
34 KB PNG
I suck at rust parsing so much. I should continue reading the book
>>
If you join the /g/derboard the guy who makes the puzzles will fuck with your input on a hard day
>>
>>107127737
BRING IT ON
>>
File: afi.jpg (270 KB, 1400x788)
270 KB
270 KB JPG
[anglofuturism intensifies]
>>
>>107127605
#include <stdio.h>
#define MAX_GEARS 50

int main(){
int gearTeethIn[MAX_GEARS-1] = {0}, gearTeethOut[MAX_GEARS-1] = {0};
double rot = 100;

scanf(" %d", &gearTeethOut[0]);
for(int i = 1; i < MAX_GEARS-1 && scanf(" %d|%d", &gearTeethIn[i-1], &gearTeethOut[i]) != EOF; i++);
scanf(" %d", &gearTeethIn[MAX_GEARS-2]);

for(int i = 0; i < MAX_GEARS-1; i++) rot = (gearTeethOut[i]*rot)/gearTeethIn[i];

printf("%ld\n", (long)rot);
}

part 3 code in c :)
>>
>but you notice a faster and equally accurate method for calculating the required value

yeah f128 and rounding
>>
>>107127676
i don't participate in these jewish datamining projects because i want them to all die
>>
>>107127844
ok.
>>
>>107127844
and what are the jews going to do when they figure out reddit account coder234 likes to solve puzzles and solved one in 16 minutes?
>>
>>107127730
stop using so many intermediate Vecs bro
lean into iterators as much as possible
for example, just do for s in contents.split('\n') {}
>>
>>107127890
you are giving them free labor and new ideas for their ai to make money with. at least code something for yourself.
>>
>>107127950
free labor by me pasting my answer 1204 into the website? you don't even have to share your code with the jews
>>
>>107127950
>free labor
nigga you paste a few characters into a field and it tells you if you're right or wrong. you're sperging out when you have no idea what you're talking about
>>
File: ec_day4.rs.png (214 KB, 711x958)
214 KB
214 KB PNG
>>
>>107127844
>t. got filtered on day 1 and is still seething
>>
File: quest4.png (53 KB, 1550x930)
53 KB
53 KB PNG
Fun little challenge.
>>
accidentally fell asleep and missed today's when it dropped, I am so mad. my time just tanked and now I have to be a local time coper.
>>
>>107127730
Paste it into chatGPT and ask "how do I make this more idiomatic"
>>
>>107128839
DONT DO THIS the jews will steal your code
>>
Why am I only now remembering intermediate gears don't matter?
>>
File: carbon4.png (3.05 MB, 1110x1602)
3.05 MB
3.05 MB PNG
We milling now boys
>>
>>107128998
>Why am I only now remembering intermediate gears don't matter?
No way that's not true. Is it?
>>
>>107129090
>>107129103
>mathlet brooted his way past the mathlet filter
>>
where's the big boy that has a single gear with 0 spokes somewhere near line 8264759 and expects you to handle it in a specific way to get the "correct" answer
>>
>>107127820
>int gearTeethIn[MAX_GEARS-1] = {0}, gearTeethOut[MAX_GEARS-1] = {0};
why?
#include <stdio.h>
int
main(void) {
long long first, inner, outer;
for (scanf("%lld ", &first); ; ) {
scanf("%lld", &inner);
if (getchar() == '|') {
scanf("%lld ", &outer);
first *= outer/inner;
}
else {
printf("%lld\n", first*100 / inner);
break;
}
}
}
>>
i'm afraid to open the problem, what if it's too hard?
>>
>>107129313
>Better to remain silent and be thought a fool than to speak and remove all doubt.
>>
File: carbon(2).png (288 KB, 1396x1430)
288 KB
288 KB PNG
>>
The second example for part 3 is wrong, it should say 1363 instead of 6818. I was sitting on the right algorithm for twenty minutes wondering why my code wasn't working.
>>
>>107129516
I get 6818 with my code.
>>
>>107129537
Curiously enough, I get the right answer for part 3 with said buggy code.
>>
>>107129103
matters in part 3 but not the other two

#part 1
print(math.floor((gears[0]/gears[-1]) * 2025))

#part 2
print(math.ceil((gears[-1]/gears[0]) * 10000000000000))
>>
>>107129103
The inner ratios all cancel each other out when you multiply through.
>>
File: 1734150183964501.png (171 KB, 1118x1458)
171 KB
171 KB PNG
why is he obsessed with ducks? i never realized how much the christmas theme was adding to AoC until now
>>
File: WAGTFKY.jpg (101 KB, 1230x692)
101 KB
101 KB JPG
>>107127629
>>
>>107129572
>>107129610
Wow thanks! Watches are a scam! I'm never buying anything with more than 2 gears ever again.
>>
>>107129683
all the gears in watches work like part 3 though
>>
>>107129652
ok I read the story and apparently we are "dragonducks" who hatched from an egg in a blacksmith's forge
>>
File: L1260612.jpg (2.14 MB, 2200x3300)
2.14 MB
2.14 MB JPG
>>107129701
>all the gears in watches work like part 3 though
its too late I'm fully digital now
>>
>>107129683
>>107129701
An intermediate gear is also useful to reverse the direction of rotation.
>>
>>107129726
But can that simulate the solar system?
>>
File: thumb-1920-589692.jpg (273 KB, 1920x1080)
273 KB
273 KB JPG
>>107129719
>ok I read the story and apparently we are "dragonducks" who hatched from an egg in a blacksmith's forge
That actually bugs me. Right off the bat they get it wrong. They're making a Game of Thrones rip off. Which would be fun. But that's not even how the Dragon's hack. It's fire! The dragon queen walks them into fire! Why is there no Duckerys Platyrhynchos??
>>
>>107129726
based casio enjoyer, welcome to the fold
>>
File: Casio.jpg (60 KB, 474x474)
60 KB
60 KB JPG
>>107129818
>>107129726
I’ve never seen a Billionaire wear a Ca-aaaack
>>
>>107129103
it's eighth grade science
are you retarded
>>
>>107129849
That’s exactly the sort of thing you forget, unless of course you’re a literal gear head.
>>
>>107129849
i'm almost positive i never learned this in school unless it was some throw away line in physics that wasn't on the test or something. still figured it out pretty quickly though just based on thinking about it a little and testing if it worked on the examples
>>
File: 4.png (927 KB, 5708x2672)
927 KB
927 KB PNG
>>
>>107129904
unwrap()).unwrap()))).unwrap())).unwrap()
>>
>>107129849
It's maths, not science
>>
>>107127605
> log in
why same shit as aoc its stupid just have a template version for generic users that don't want to create a account.
>>
>>107131050
>gears
>math
not in my time
>>
>>107129943
>pytoddler encountering code that doesn't hold his hand
>>
>>107131265
why is it so hard to admit it's ugly as fuck?
>>
File: 4.png (786 KB, 4900x2542)
786 KB
786 KB PNG
>>107131276
>>
>>107129309
Read that input had a list of gears, immediately created said list and started parsing it. Didnt ever think to change it after. Your implementation is neat
>>
>>107131338
Does part 3 work? You don't get rounding errors?
>>
How’s it going Johnnie Doe? Falling a bit behind? Are you already filtered? Is it too hard for you?
Don’t worry, Johnnie. McDonalds is hiring
>>
>>107131432
it's Rust—if it compiles, it works.
>>
>>107131516
That's not how logic errors work



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.