Search found 2 matches

by rajahten
Thu Feb 12, 2009 8:29 am
Forum: Challenges Solved
Topic: Valuation
Replies: 103
Views: 9333

Wow. Some code-examples here seem to be kinda ... bloated :o Its so easy with Java (and nice to read as well :D) public class Valuation { public int calculate(String s){ StringBuffer sb = new StringBuffer(s); int result=0, pos=0; while(pos < sb.length()){ if(sb.charAt(pos) != 'x'){ result += Integer...
by rajahten
Thu Feb 12, 2009 8:03 am
Forum: Challenges Solved
Topic: One Minute Man
Replies: 39
Views: 4538

I used this python script, which i made. Guess i could've made it with less code, but i'm still learning :D import urllib import time proxy = {'http': 'proxyurl'} opener = urllib.FancyURLopener(proxy) finished = False compare = 'back later' while not finished: f = opener.open("http://www.hacker...