Skip to content

Instantly share code, notes, and snippets.

@saich
saich / hackerrank.challenge.js
Created July 1, 2012 10:40
Simple automated solution to hackerrank.com beta invite challenge
var cmd = $("#prompt-input");
function newGame(num) {
triggerInput(cmd, "clear");
if(num % 6 == 0) num++;
triggerInput(cmd, "challenge " + num);
}
function triggerInput(cmd, str) {
cmd.val(str);