public String encode(long val){
    StringBuilder sb=new StringBuilder();
    boolean ever=false;
    for (long x: numbers) {
      int temp=(int)(val/x);
      //System.out.println("EH "+val+"/"+x+"="+temp);
      if (temp>0) {
        ever=true;
        val-=((long)temp)*x;
      }
      if (ever)
        sb.append(represent[temp]);
    };
    return sb.toString();
  }