Objective
Write a program that outputs some printable ASCII characters. The trick is that if the program is reversed byte-by-byte, it must output the same thing in the reverse order, byte-by-byte, too.
Rules
No standard loopholes.
The program must not be a palindrome, nor can it be 1 byte in ...
Quick question about this challenge: https://codegolf.stackexchange.com/questions/142794/draw-my-contours Is it okay (in general) to create a function that takes an array of ints as input for challenges like this?
Lesson_17_Activity_One
"Enter the Scores:"P
0 @sum
0 @size
Ii @input
W :input -1 C= {
:input @+sum
:size C+
Ii @input
}
"The average is: " :sum CD :size / + p
(on an interesting side not, if you were to imagine the above as being prefix instead of postfix, you'd have a pretty good idea of what jolf was when it was a baby)
@HyperNeutrino someone's been hurt emotionally by tetris, obviously
> Get used to this even-same, odd-changes notion. We will be seeing it a lot ("lot" is a mathematical term meaning you will be sick of it - but that it's probably something that's really important.)
Your challenge is to print x digits of pi where x is your code length.
Examples:
Source code (length) -> output
foo (3) 3.14
foobar (6) 3.14159
kinda long (10) 3.141592653
+++++ (5) 3.1415
123456789 (9) 3.14159265
You can use floor(π...
star trek, probably not. Dr who is probably fine as long as you're not watching a finale. there's a bit of a story line in dr who but I've skipped around
Literally print a Polyglot
code-golf polyglot
Your Task
Write a program that outputs Poly when executed in the first and glot when executed in a second language of your choice. Obviously the first and second language can't be identical.
Input
None!
Output
Either, Poly or glot.
Rules
Thi...
Introduction:
Inspired by both Perfect License Plates and How many points does my license plate give?
Just like in the challenges above, me and my little brother had a game of our own with license plates as kids. We tried to create (random/funny) sentences with the (numbers and) letters of the ...
CMC: Given a positive integer, convert to binary; replace each 1 with a ( and each 0 with a ) and join with : with a colon at the beginning and the end.
Given two positive integers a and b, output two positive integers c and d such that:
c divides a
d divides b
c and d are co-prime
the LCM of c and d equals the LCM of a and b
If there are more than one possible answers, you can output only one or all of them.
Testcases:
a b c d
12 18 4...
Perl 6, 48 bytes
{my$g=$^a gcd$^b;{$a*$_/$g,$b/$_}(($a/$g)gcd$g)}
Try it online!
Hasn't anyone noticed that there's a simple closed formula? With
g = gcd(a, b)
B = gcd(g, a/g)
a valid result is
c = a * B / g
d = b / B
This question is about the rules of One OEIS After Another.
A comment was made about hard-coding the values of a particularly difficult sequence, for the sake of keeping the challenge going. Peter Taylor claimed that a hard-coded answer must account for at least 1000 terms or else be invalid. T...
Your challenge today is to output a given term of a sequence ennumerating all of the integers. The sequence is as follows: If we have a 0-indexed function generating the sequence f(n), then f(0) = 0; abs(f(n)) = ciel(n/2); sign(f(n)) is positive when nand ciel(n/2) are either both even or both od...
I wanted something that would take a stack of [[[a1, a2, ...], [b1, b2, ...]], [[c1, c2, ...], [d1, d2, ...]]] and return [[a1*c1, c2*c2, ...], [b1*d1, b2*d2, ...]]
..dammit.. SOGL does have a ceiling divide by 2 built-in ↔ but it's added as an overload for mirror horizontally and since SOGLs input is untyped it doesn't work..
@Stephen While looking through the compiler source, I found that you could replace "Switch to plan X if no one is waiting." by "Switch to plan X a a.", as the compiler only checks the word count. It might save a few bytes...
@Luke there are multiple approaches, but the most plausible one I think is (though I haven't checked) is to push a space after\ but pop a space before/
Given an expression matching the regex /^[-~]+x$/, evaluate it in terms of x and output a string matching the regex /^-?x[+-]\d+$/.
For example, the string -~x evaluates to x+1, while the string -~-x evaluates to -x+1, and the string -~-~--x evaluates to x+2.
We start from x and evaluate the st...
Google PageSpeed ranks my site down because the delivery of a CSS file is not optimized and therefore blocking. That CSS file is hosted by Google though...