반응형
    
    
    
  import java.util.Scanner;  
  
class Solution  
{  
    public static void main(String args[]) throws Exception  
    {  
  
        Scanner sc = new Scanner(System.in);  
        int T;  
        T=sc.nextInt();  
  
  
        for(int test_case = 1; test_case <= T; test_case++)  
        {  
            int A = sc.nextInt();  
            int B = sc.nextInt();  
            int division = A / B;  
            int quotient = A % B;  
            System.out.println("#"+test_case +" " +division + " " + quotient);  
        }  
    }  
}반응형
    
    
    
  '알고리즘 문제풀이' 카테고리의 다른 글
| [SWEA][D1] 2047. 신문 헤드라인 Java (0) | 2025.05.27 | 
|---|---|
| [SWEA][D1] 2046. 스탬프 찍기 Java (0) | 2025.05.27 | 
| [SWEA][D1] 2019. 더블더블 Java (0) | 2025.05.27 | 
| [SWEA][D1] 1936. 1대1 가위바위보 Java (0) | 2025.05.27 | 
| [SWEA][D1] 1933. 간단한 N 의 약수 JAVA (0) | 2025.05.27 |