(SPOJ) 3742 - Feynman - Solução
import java.io.*; import java.util.*; class Main { public static void main(String[] args) throws NumberFormatException, IOException { Main processando = new Main(); processando.processa(); System.exit(0); } void processa() throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); String valor = br.readLine(); int vInt = Integer.parseInt(valor); while(vInt != 0) { ...