結果

問題 No.2647 [Cherry 6th Tune A] Wind
ユーザー ks2mks2m
提出日時 2024-02-23 21:24:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 616 ms / 2,000 ms
コード長 695 bytes
コンパイル時間 4,635 ms
コンパイル使用メモリ 80,516 KB
実行使用メモリ 66,212 KB
最終ジャッジ日時 2024-02-23 21:24:31
合計ジャッジ時間 11,735 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
58,088 KB
testcase_01 AC 396 ms
65,556 KB
testcase_02 AC 314 ms
63,508 KB
testcase_03 AC 408 ms
65,488 KB
testcase_04 AC 354 ms
63,628 KB
testcase_05 AC 484 ms
65,900 KB
testcase_06 AC 455 ms
65,616 KB
testcase_07 AC 414 ms
65,496 KB
testcase_08 AC 427 ms
65,832 KB
testcase_09 AC 616 ms
66,212 KB
testcase_10 AC 603 ms
66,064 KB
testcase_11 AC 568 ms
66,008 KB
testcase_12 AC 503 ms
63,944 KB
testcase_13 AC 146 ms
58,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		for (int z = 0; z < t; z++) {
			int d = sc.nextInt();
			BigDecimal a = sc.nextBigDecimal();
			BigDecimal[] x = new BigDecimal[d];
			for (int i = 0; i < d; i++) {
				x[i] = sc.nextBigDecimal();
			}

			StringBuilder sb = new StringBuilder();
			for (int i = 0; i < d; i++) {
				sb.append(x[i].divide(a, RoundingMode.HALF_UP).toPlainString()).append(' ');
			}
			sb.deleteCharAt(sb.length() - 1);
			System.out.println(sb.toString());
		}
		sc.close();
	}
}
0