05.07.2014, 18:24
Challenge accepted:
Sorry, but it really does suck.
Java version, if anyone wants to test:
Sorry, but it really does suck.
Java version, if anyone wants to test:
Код:
public static String rit_DeHash(String buffer) { int length = buffer.length(); String result = ""; String temp = ""; for(int i=0;i<length;i++) { temp = temp + buffer.charAt(i); if(Integer.parseInt(temp) % 7557 == 0 && Integer.parseInt(temp)!= 0) { if(i < length-1 && buffer.charAt(i+1) == '0') continue; result += Character.toString((char) (Integer.parseInt(temp)/7557)); //System.out.println(result); temp = ""; } } return result; }