forked from wotjd4305/Algorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswe5162.java
More file actions
42 lines (29 loc) · 855 Bytes
/
swe5162.java
File metadata and controls
42 lines (29 loc) · 855 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class swe5162 {
static Boolean P_Arr[];
static ArrayList<Integer> AL = new ArrayList<>();
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
int answer;
//Å×½ºÆ®ÄÉÀ̽º
for(int t=0; t<T; t++) {
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
answer = Solution(A,B,C);
System.out.println("#"+ (t+1) + " " + answer);
}
}
public static int Solution(int A, int B, int C)
{
int answer = 0;
int count = C;
int max = Math.max(A, B);
int min = Math.min(A,B);
answer += C/min;
return answer;
}
}