// Ramanujans Taxi Problem: // Finde ganzzahlige Loesungen von i^3+j^3=k^3+l^3 // http://www.durangobill.com/Ramanujan.html public class taxi { private static class pairs { int i; int j; pairs next; pairs (int i, int j, pairs next) { this.i = i; this.j = j; this.next = next; } public String toString() { String s=" = "+i+"^3+"+j+"^3"; if (next != null) s+=next; return s; } } public static int cube(int i) { return i*i*i; } public static void main(String [] args) { int limit = Integer.parseInt(args[0]); // ListTable t = new ListTable(); // HashTable t = new HashTable(); // HashTable t = // new HashTable((int)Math.round(Math.pow((double)limit,2.0/3.0)/5.0)+1); TreeTable t = new TreeTable(); int count = 0; for (int i=1; cube(i)