Created
March 19, 2017 12:57
-
-
Save fermopili/e9f7e604c772188dd2b4bd30b1a79779 to your computer and use it in GitHub Desktop.
com.javarush.task.task15.task1515
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Статики 2 | |
*/ | |
public class Solution { | |
public static int A; | |
public static int B; | |
static{ | |
BufferedReader reader =new BufferedReader(new InputStreamReader(System.in)); | |
try | |
{ | |
A=Integer.parseInt(reader.readLine()); | |
B=Integer.parseInt(reader.readLine()); | |
} | |
catch (IOException e) | |
{ | |
e.printStackTrace(); | |
} | |
try | |
{ | |
reader.close(); | |
} | |
catch (IOException e) | |
{ | |
e.printStackTrace(); | |
} | |
} | |
public static final int MIN = min(A, B); | |
public static void main(String[] args) { | |
System.out.println(MIN); | |
} | |
public static int min(int a, int b) { | |
return a < b ? a : b; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment