結果
問題 | No.4 おもりと天秤 |
ユーザー | juugaya |
提出日時 | 2020-07-29 10:21:49 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 704 bytes |
コンパイル時間 | 2,033 ms |
コンパイル使用メモリ | 71,504 KB |
実行使用メモリ | 57,796 KB |
最終ジャッジ日時 | 2023-09-11 07:11:55 |
合計ジャッジ時間 | 6,078 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 121 ms
55,536 KB |
testcase_02 | AC | 122 ms
56,112 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 121 ms
55,932 KB |
testcase_07 | WA | - |
testcase_08 | AC | 134 ms
55,876 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 120 ms
56,024 KB |
testcase_12 | AC | 120 ms
55,584 KB |
testcase_13 | AC | 119 ms
55,980 KB |
testcase_14 | AC | 119 ms
55,820 KB |
testcase_15 | AC | 118 ms
55,548 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | AC | 137 ms
56,124 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
ソースコード
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 &&sum1%2==0){ System.out.println("possible"); } else{System.out.println("impossible");} } }