the controller chose a random wikipedia page, randmly browse in the links, and output the starting page and the ending page. after the bots start from the starting page and go to the ending page, outputting the visited pages
Hey everyone, my quick search didn't turn anything up (yet), did we have a challenge yet where you were given a fibonacci number and had to find its index?
@SEJPM itertools.count(1) returns an infinite iterator counting up from one and set() evaluates the iterator and attempts to turn it into a set, but it's infinite, occupying a large amount of memory quickly
Given a directory (such as `C:/'), given from stdin or read from a file, produce a directory tree, with each file/folder indented based on its depth.
Example
If I have a C:/ drive which only contains two folders foo and bar, and bar is empty while foo contains baz.txt, then running with input ...
C, 129 127 125 107 106 105 93 92 bytes
c;d;f(char*s){for(;*s;){c=*s,d=*(s+++1);putchar(c);s+=isalpha(c)*d&&((c|32)==(d|32)&&c^d);}}
A C port of my C# answer. My C may be a bit bad. I don't use the language a lot anymore. Any help is welcome!
1 byte saved thanks to Lowjacker's trick: a!=b = a...
@uoɥʇʎPʎzɐɹC I started with Python (1 year) and I used to code in C++ (2 years) too. I think C could teach you a lot about low level programming which is it very useful for security and programming in general.
Fibonacci reversed!
code-golf fibonacci math
Introduction
We all know and love our Fibonacci sequence and have seen a myriad of challenge on it here already. However, we're still lacking a very simple case which this answer is going to provide: Reversed fibonacci! So given F_n your job is to...
In English quoted text is normally written in speech marks, "like this," or occasionally 'like this.'
However on this site I have seen people writing German quotes like »this« and „this“
What is the correct form(s)?
Im Englischen werden normalerweise Gänsefüßchen "wie diese" oder gelegentlic...
MetaPost (207)
numeric h,d,y;h=5;d=-1;y=1;u=5mm;pair p;string s;for x=1upto26:p:=(x,y)*u;s:=char(x+64);if x=13:s:="MetaPost";elseif x>13:p:=(x+2,y)*u;fi;label.rt(s,p);if(y=h)or(y=1):d:=d*-1;fi;if h=1:d:=0;fi;y:=y+d;endfor;
You can try it here.