Skip to content

Instantly share code, notes, and snippets.

@jackie-scholl
Created February 16, 2013 22:29
Show Gist options
  • Save jackie-scholl/4969010 to your computer and use it in GitHub Desktop.
Save jackie-scholl/4969010 to your computer and use it in GitHub Desktop.
public class Out{ public static void main(String[] g){
for(int h=1; h<g.length; h+=2)
System.out.println(g[h-1].charAt(0)==68?g[h].substring(0,4)+g[h].substring(0,4)+" and "+g[h].substring(4)+g[h]
.substring(4):g[h-1].charAt(0)==65?g[h].substring(0,g[h-1].charAt(3)-48)+g[h].substring(0,g[h-1].charAt(3)-48)
+g[h].substring(g[h-1].charAt(3)-48,56-g[h-1].charAt(3)):g[h-1].charAt(0)==83?g[h].substring(g[h-1].charAt(8)
-48, 56-g[h-1].charAt(8))+g[h].substring(56-g[h-1].charAt(8))+g[h].substring(56-g[h-1].charAt(8)):g[h-1].charAt
(0)==85?g[h].substring(4)+g[++h].substring(0,4):g[h-1].charAt(0)==73?g[h].substring(0,2)+g[h].substring(6)+g[+
+h].substring(0,2)+g[h].substring(6):"X");
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment