1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | import java.util.*; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int B = sc.nextInt(); int Quotient = B / (N-1); int min = 0; int max = 0; if(B % (N-1) == 0){ min = Quotient-1+B; max = Quotient+B; }else{ min = Quotient+B; max = Quotient+B; } System.out.println(min+" "+max); } } |
Labels
Programming
(16)
Algorithm
(15)
Java
(15)
ASP .NET
(4)
Enterprise Architecture
(4)
PHP and MySQL
(4)
Software Engineering
(2)
C#
(1)
Data Mining
(1)
Deep Learning
(1)
Java Script
(1)
Python
(1)
Saturday, October 17, 2015
할부
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment