# Java, <s>274</s> <s>272</s> 264 bytes (includes Pluto!) <!-- language-all: lang-java --> void p(String p,String l){String q="MeVeEaMaJuSaUrNePl";int w=q.indexOf(p.substring(0,2))/2,e=q.indexOf(l.substring(0,2))/2,m=1,t=e,d[]={5029,4140,7834,55039,64627,144895,162745,140538};long h=0;if(w>e){e=w;w=t;m=-1;}for(;e-->w;)h+=d[e]*1e4;System.out.print(h*m);} Input/Output: p("Mercury","Mars") --> 170030000 p("Mars","Mercury") --> -170030000 p("Earth","Earth") --> 0 Spaced and tabbed: void p(String p,String l){ String q="MeVeEaMaJuSaUrNePl"; int w=q.indexOf(p.substring(0,2))/2, e=q.indexOf(l.substring(0,2))/2, m=1, t=e, d[]={5029,4140,7834,55039,64627,144895,162745,140538}; long h=0; if(w>e){ e=w; w=t; m=-1; } for(;e-->w;) h+=d[e]*1e4; System.out.print(h*m); }