結果

問題 No.40 多項式の割り算
ユーザー holegumaholeguma
提出日時 2015-08-11 02:05:13
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 720 bytes
コンパイル時間 2,034 ms
コンパイル使用メモリ 74,668 KB
実行使用メモリ 56,204 KB
最終ジャッジ日時 2023-09-25 08:03:26
合計ジャッジ時間 8,004 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
55,848 KB
testcase_01 AC 115 ms
53,728 KB
testcase_02 AC 43 ms
49,352 KB
testcase_03 AC 115 ms
55,892 KB
testcase_04 AC 140 ms
55,508 KB
testcase_05 AC 150 ms
55,920 KB
testcase_06 AC 155 ms
56,084 KB
testcase_07 AC 158 ms
56,004 KB
testcase_08 AC 118 ms
55,480 KB
testcase_09 AC 147 ms
55,512 KB
testcase_10 AC 152 ms
56,028 KB
testcase_11 AC 149 ms
55,704 KB
testcase_12 AC 127 ms
55,788 KB
testcase_13 AC 152 ms
55,952 KB
testcase_14 AC 143 ms
55,776 KB
testcase_15 AC 140 ms
55,572 KB
testcase_16 AC 146 ms
55,908 KB
testcase_17 AC 129 ms
55,932 KB
testcase_18 AC 153 ms
55,972 KB
testcase_19 AC 160 ms
56,204 KB
testcase_20 AC 138 ms
55,696 KB
testcase_21 AC 127 ms
55,648 KB
testcase_22 AC 124 ms
55,416 KB
testcase_23 AC 129 ms
53,636 KB
testcase_24 AC 143 ms
55,752 KB
testcase_25 AC 114 ms
56,028 KB
testcase_26 AC 115 ms
55,796 KB
testcase_27 AC 115 ms
53,844 KB
testcase_28 RE -
testcase_29 AC 114 ms
55,572 KB
testcase_30 AC 115 ms
55,928 KB
testcase_31 AC 115 ms
55,768 KB
testcase_32 AC 117 ms
55,724 KB
testcase_33 AC 115 ms
56,144 KB
testcase_34 AC 118 ms
55,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.StringTokenizer;

class Main{

static final PrintWriter out=new PrintWriter(System.out);

public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
int d=Integer.parseInt(line);
int[] a=new int[d+1];
StringTokenizer st=new StringTokenizer(br.readLine());
for(int i=0;i<=d;i++) a[i]=Integer.parseInt(st.nextToken());
for(int i=d;i>=3;i--) a[i-2]+=a[i];
int dd=a[2]==0?a[1]==0?0:1:2;
out.println(dd);
if(dd==0) out.println(a[0]);
if(dd==1) out.printf("%d %d\r\n",a[0],a[1]);
if(dd==2) out.printf("%d %d %d\r\n",a[0],a[1],a[2]);
out.flush();
}
}
}
0