SW Expert Academy
SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!
swexpertacademy.com
import java.util.Scanner;
import java.io.FileInputStream;
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 number = sc.nextInt();
String [][] array = new String[number*2][10];
int j =0; int num1 =0; int num2 =0;
for(int i=0; i<number; i++){
String word1 = sc.next();
num1 += sc.nextInt();
while(j<num1){
array[j/10][j%10]=word1;
j++;
}
}
System.out.println("#" + test_case);
for(int k=0; k<=num1/10; k++){
for(int l=0; l<10; l++){
if(array[k][l]!=null)
System.out.print(array[k][l]);
}
System.out.println();
}
}
}
}
'SWEA' 카테고리의 다른 글
[SWEA] 새로운 불면증 치료법 (1) | 2024.10.10 |
---|---|
[SWEA] 가랏! RC카! (0) | 2024.10.08 |
[SWEA] 간단한 소인수분해 (1) | 2024.10.06 |
[SWEA] 날짜 계산기 (0) | 2024.10.04 |
[SWEA] 두 개의 숫자열 (0) | 2024.10.04 |