Skip to content

Commit

Permalink
Refactor MultipleOfSeventeen
Browse files Browse the repository at this point in the history
  • Loading branch information
fatosmorina committed May 11, 2017
1 parent 2421354 commit a81b2e0
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 additions & 29 deletions UVa/MultipleOfSeventeen.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

//https://uva.onlinejudge.org/index.php?option=onlinejudge&Itemid=99999999&page=show_problem&category=&problem=3001


import static java.lang.Integer.parseInt;
import static java.lang.System.exit;

Expand All @@ -41,7 +42,7 @@ public class MultipleOfSeventeen {
private static final BigInteger BIGINTEGER_SEVENTEEN = new BigInteger("17");
private static final BigInteger BIGINTEGER_ZERO = new BigInteger("0");

static void solve() throws Exception {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
while (input.hasNext()) {
BigInteger number = input.nextBigInteger();
Expand All @@ -60,32 +61,4 @@ static void solve() throws Exception {
}
input.close();
}

static int nextInt() throws IOException {
return parseInt(next());
}

static String next() throws IOException {
while (tok == null || !tok.hasMoreTokens()) {
tok = new StringTokenizer(in.readLine());
}
return tok.nextToken();
}

public static void main(String[] args) {
try {
in = new BufferedReader(new InputStreamReader(System.in));
out = new PrintWriter(new OutputStreamWriter(System.out));
solve();
in.close();
out.close();
} catch (Throwable e) {
e.printStackTrace();
exit(0);
}
}

static BufferedReader in;
static PrintWriter out;
static StringTokenizer tok;
}

0 comments on commit a81b2e0

Please sign in to comment.