All pastes #514882 Raw Edit

Untitled

public java v1 · immutable
#514882 ·published 2007-05-27 23:33 UTC
rendered paste body
/* ID: tiago1LANG: JAVATASK: ride*/import java.io.*;public class Ride{       public static void main(String[] args)   {                String abc = "ABCDEFGHIJKLMNOPQRSTUVXYWZ";            String cometa = null;            String group = null;                        int produto1 = 1;            int produto2 = 1;                       BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in ));                      try{                cometa =  dataIn.readLine();                for(int i = 0; i < cometa.length(); i++)                {                produto1 *= abc.indexOf(cometa.charAt(i)) + 1;                }                                                }            catch(IOException e)            {                        }           try{                group =  dataIn.readLine();                for(int i = 0; i < group.length(); i++)                {                    produto2 *= abc.indexOf(group.charAt(i)) + 1;                                }            }            catch(IOException e)            {                            }                               if(produto1 % 47   == produto2 % 47  )          System.out.println("GO");          else          System.out.println("STAY");    }}