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 General Sebast1an‭

Type On... Excerpt Status Date
Comment Post #290596 Albeit not what I expected, this is actually interesting.
(more)
3 months ago
Edit Post #284326 Post edited:
about 1 year ago
Edit Post #279408 Post edited:
over 1 year ago
Edit Post #283972 Post edited:
about 2 years ago
Edit Post #282951 Post edited:
over 2 years ago
Edit Post #284605 Post edited:
over 2 years ago
Edit Post #284589 Post edited:
over 2 years ago
Edit Post #282901 Post edited:
over 2 years ago
Edit Post #282901 Post edited:
over 2 years ago
Edit Post #284611 Post edited:
over 2 years ago
Edit Post #284611 Post edited:
over 2 years ago
Edit Post #284614 Post edited:
over 2 years ago
Edit Post #284614 Post edited:
over 2 years ago
Edit Post #284614 Initial revision over 2 years ago
Answer A: Reverse an ASCII string
[Java (JDK)], 88 83 bytes static void f(String s){for(int i=s.length();i>0;System.out.print(s.charAt(--i)));} Try it online!
(more)
over 2 years ago
Edit Post #284611 Post edited:
over 2 years ago
Edit Post #284611 Post edited:
over 2 years ago
Edit Post #284611 Initial revision over 2 years ago
Answer A: Make $2 + 2 = 5$
[Java (JDK)], 51 50 23 21 bytes x->y->x==y&y==2?5:x+y Try it online! Golfed 27 bytes thanks to @Moshi's advice. Golfed 2 bytes thanks to @user's advice on Discord.
(more)
over 2 years ago
Edit Post #284605 Initial revision over 2 years ago
Answer A: Tips for golfing in Java
A clever way to replace `Math` functions You can shorten `if-else` statements through the `a?b:c` syntax, where `a` is the statement of `if`, `b` is the result of `if`, and `c` is the result of `else`. static void main(String[]a){ &#9;int i = 95; &#9;System.out.print(i&gt;0?"positive":"ne...
(more)
over 2 years ago
Edit Post #284604 Initial revision over 2 years ago
Answer A: Tips for golfing in Java
Booleans are replaceable Java, like Python, has pretty convenient yet nasty ways to golfing down code through comparison operators. Especially this case, this time with booleans. You can compare `int`s and it will result to either `false` or `true`, which helps you break 1 and 2 bytes respectively...
(more)
over 2 years ago
Edit Post #284603 Initial revision over 2 years ago
Answer A: Collatz conjecture; Count the tries to reach $1$
[Java (JDK)], 150 bytes interface M{static void main(String[]a){int i=new java.util.Scanner(System.in).nextInt(),j=0;for(;i!=1;j++){i=i%2==1?i3+1:i/2;}System.out.print(j);}} Try it online! From my shortC answer.
(more)
over 2 years ago
Edit Post #284589 Post edited:
over 2 years ago
Edit Post #284589 Post edited:
over 2 years ago
Comment Post #284578 I defy your rules! https://codegolf.codidact.com/posts/283141/284589#answer-284589
(more)
over 2 years ago
Edit Post #284589 Post edited:
over 2 years ago
Edit Post #284589 Initial revision over 2 years ago
Answer A: 99 Shortened Bottles of Beer
[Java (JDK)], 311 301 296 bytes interface A{static void main(String[]x){String a=" bottle",b=" of beer",c=" on the wall. ",e;for(int i=99;i>0;i--){e=i>1?"s":"";System.out.println(i+a+e+b+c+(i)+a+e+b+(i>1?".\nTake one down and pass it around. ":".\nGo to the store and buy some more. ")+(i>1...
(more)
over 2 years ago
Edit Post #284588 Initial revision over 2 years ago
Answer A: Tips for golfing in Java
Use `interface` The special thing about this is that it lets you drop `public` when you originally call a `class` to run the `main` function. ```java class F{public static void main(String[]a{}} interface M{static void main(String[]a){}} ``` Try it online! Used on "Hello, {name}!"
(more)
over 2 years ago
Comment Post #284578 @#53837 Are you challenging me?
(more)
over 2 years ago
Edit Post #284579 Initial revision over 2 years ago
Answer A: Tips for golfing in Java
Use `for(;;)` instead of `while(true)` The title's self-explanatory. A byte saver.
(more)
over 2 years ago
Edit Post #284578 Post edited:
over 2 years ago
Edit Post #284578 Initial revision over 2 years ago
Question Tips for golfing in Java
This is a list of golfing tips for the language known as Java. If you have a tip, add it in!
(more)
over 2 years ago
Edit Post #284337 Post edited:
over 2 years ago
Edit Post #284407 Post edited:
over 2 years ago
Edit Post #284407 Post edited:
over 2 years ago
Edit Post #284519 Post edited:
over 2 years ago
Comment Post #284520 Yeah, I'm not so sure if that's even a valid way to set your inputs. Might update later.
(more)
over 2 years ago
Edit Post #284519 Post edited:
over 2 years ago
Edit Post #284407 Post edited:
over 2 years ago
Edit Post #284407 Post edited:
over 2 years ago
Edit Post #284519 Initial revision over 2 years ago
Question Operation "Find The Operator"
Challenge Make a program that takes input of 3 non-negative integers: a result and 2 other values that once calculated results to the 3rd value. - The program must figure out how to get the 2 first numbers to equivalence itself with the 3rd. It could be either addition, subtraction, multiplicat...
(more)
over 2 years ago
Edit Post #284407 Post edited:
over 2 years ago