public
Created

  • Download Gist
resistor.c
C
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
// nice work, #valvearg2
// ... and great job to The_MAZZTer for figuring it out!
// how it works: http://d.pr/i/iDp6
// ruby equivalent: [18, 5, 19, 9, 19, 20, 15, 18].collect{|c| (c + 96).chr}.join
 
#include <iostream>
using namespace std;
 
void Q(int val) {
printf("%c", val + 'a' - 1);
}
 
int main(void) {
int Valve = 3;
for (int i = 0; i < 5991; i++)
Valve++;
Q(Valve / 333);
Valve += 12345;
Q(Valve % 18334);
Valve /= 3;
Q(Valve - 6094);
for (int m = 0; m < 19; m++)
Valve += m;
int OSW = 4 * 2 + 1;
Q(OSW);
OSW *= 2;
Q(OSW + 1);
Q(OSW + 2);
int l = 45;
Q(l / 3);
Valve = 0;
int notthree = (l + 9) / 3;
Q(notthree);
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.