結果
| 問題 |
No.4 おもりと天秤
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-29 10:16:18 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 692 bytes |
| コンパイル時間 | 1,818 ms |
| コンパイル使用メモリ | 75,016 KB |
| 実行使用メモリ | 56,160 KB |
| 最終ジャッジ日時 | 2024-06-28 21:28:06 |
| 合計ジャッジ時間 | 5,272 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 WA * 8 |
ソースコード
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");}
}
}