Count the dots
code-golf
Given a string of printable ASCII, count the dots.
The following characters have one dot each: i j . ; ! ?. This character has two dots: :. No other characters have dots.
Rules
Default I/O rules and standard rules apply. Standard loopholes are forbidden.
This is code-go...
The task is to find the shortest solution to the following problem:
Given an integer n (0<n<1e7) find n+C(n), where C(n) is the count of set bits in a binary representation of n.
Whitespace must not be included in the final count.
My current solution (78 bytes, C++14):
#include"iostream"
int n;
m...
Does anybody here use Git for Windows? I'm having the opposite of this problem: my recent repos aren't showing up at all, even though they are listed in my .gitconfig file.
"Is there oxygen on Mars?" "Nobody knows, nobody's been there" "Nobody's been on Mars???" - The two people sitting next to me at fucking carnegie mellon university, in full seriousness
Objective
Given a nonnegative rational number whose denominator is a power of 2, decide whether its (finite-length) binary expansion is symmetric by the radix point.
I/O format
It is assumed that the input is a reduced fraction. Inputs that don't fit into this format fall in don't care situation....
Symmetrical Function
Objective: Write a symmetrical function that outputs the string 'code golf'. The function itself must be symmetrical, and when executed, it should output the exact string.
Requirements:
The function must be symmetrical, meaning it should read the same forward and backward.
...