結果

問題 No.4 おもりと天秤
ユーザー juugayajuugaya
提出日時 2020-07-29 10:16:18
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 692 bytes
コンパイル時間 2,061 ms
コンパイル使用メモリ 71,904 KB
実行使用メモリ 57,588 KB
最終ジャッジ日時 2023-09-11 07:11:20
合計ジャッジ時間 6,393 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,612 KB
testcase_01 AC 118 ms
55,644 KB
testcase_02 WA -
testcase_03 AC 118 ms
55,860 KB
testcase_04 AC 122 ms
55,500 KB
testcase_05 AC 138 ms
55,560 KB
testcase_06 WA -
testcase_07 AC 136 ms
55,628 KB
testcase_08 AC 137 ms
55,648 KB
testcase_09 AC 138 ms
55,948 KB
testcase_10 AC 136 ms
55,612 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 119 ms
55,344 KB
testcase_17 AC 118 ms
55,540 KB
testcase_18 WA -
testcase_19 AC 138 ms
55,880 KB
testcase_20 AC 137 ms
55,332 KB
testcase_21 AC 134 ms
55,692 KB
testcase_22 AC 134 ms
55,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      String lo = sc.nextLine();
      int n =Integer.parseInt(lo);
      String l=sc.nextLine();
      int b[] = new int[n];
      //String [] ll=l.split(" ");
      //int a =Integer.parseInt(ll[1]);
      int sum1=0;
    // int sum2=0;
        for(int i=0;i<n;i++){
          String [] ll=l.split(" ");
         
          b[i]=Integer.parseInt(ll[i]);
          sum1=sum1+b[i];
          
    //  System.out.println(l);
  }
  if(sum1%2==0){
             System.out.println("possible");
          }
      
      else{System.out.println("impossible");}
        }
}
0