結果

問題 No.40 多項式の割り算
ユーザー soujikisoujiki
提出日時 2015-04-27 11:37:11
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 593 bytes
コンパイル時間 5,612 ms
コンパイル使用メモリ 73,976 KB
実行使用メモリ 60,400 KB
最終ジャッジ日時 2023-09-18 13:45:07
合計ジャッジ時間 14,396 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 143 ms
55,732 KB
testcase_01 AC 144 ms
55,808 KB
testcase_02 AC 156 ms
56,580 KB
testcase_03 AC 142 ms
55,796 KB
testcase_04 AC 243 ms
59,424 KB
testcase_05 AC 246 ms
60,400 KB
testcase_06 AC 266 ms
59,652 KB
testcase_07 AC 269 ms
60,220 KB
testcase_08 AC 170 ms
56,004 KB
testcase_09 AC 248 ms
59,916 KB
testcase_10 AC 261 ms
59,956 KB
testcase_11 AC 237 ms
59,668 KB
testcase_12 AC 225 ms
59,392 KB
testcase_13 AC 271 ms
60,128 KB
testcase_14 AC 246 ms
59,812 KB
testcase_15 AC 242 ms
59,772 KB
testcase_16 AC 270 ms
59,720 KB
testcase_17 AC 228 ms
58,796 KB
testcase_18 AC 262 ms
59,856 KB
testcase_19 AC 264 ms
60,292 KB
testcase_20 AC 242 ms
59,156 KB
testcase_21 AC 225 ms
59,540 KB
testcase_22 AC 217 ms
59,012 KB
testcase_23 AC 237 ms
59,428 KB
testcase_24 AC 255 ms
60,184 KB
testcase_25 AC 145 ms
55,708 KB
testcase_26 AC 146 ms
54,104 KB
testcase_27 AC 146 ms
55,832 KB
testcase_28 RE -
testcase_29 AC 145 ms
55,924 KB
testcase_30 AC 145 ms
55,748 KB
testcase_31 AC 147 ms
55,744 KB
testcase_32 AC 148 ms
55,832 KB
testcase_33 AC 147 ms
55,804 KB
testcase_34 AC 147 ms
55,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Yukicoder_40{
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int D = stdIn.nextInt();
		int[] b = new int[D+1];
		for(int i=0;i<D+1;i++){
			b[i] = stdIn.nextInt();
		}

		for(int i=D;i>=3;i--){
			b[i-2] = b[i-2] + b[i];
			b[i] = 0;
		}

		for(int i=2;i>=0;i--){
			if(b[i] != 0){
				System.out.println(i);
				for(int j=0;j<=i;j++){
					if(j==i){
						System.out.println(b[j]);
						break;
					}
					System.out.print(b[j]+" ");
				}
				break;
			}
			if(i==0){
				System.out.println(i+"\n"+i);
			}
		}

	}
}
0