Skip to content

Instantly share code, notes, and snippets.

@fermopili
Created March 19, 2017 12:57
Show Gist options
  • Save fermopili/e9f7e604c772188dd2b4bd30b1a79779 to your computer and use it in GitHub Desktop.
Save fermopili/e9f7e604c772188dd2b4bd30b1a79779 to your computer and use it in GitHub Desktop.
com.javarush.task.task15.task1515
/*
Статики 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