結果
| 問題 |
No.4 おもりと天秤
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-29 10:21:49 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 704 bytes |
| コンパイル時間 | 2,460 ms |
| コンパイル使用メモリ | 74,636 KB |
| 実行使用メモリ | 54,572 KB |
| 最終ジャッジ日時 | 2024-06-28 21:31:38 |
| 合計ジャッジ時間 | 6,500 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 13 |
ソースコード
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");}
}
}