結果
| 問題 |
No.723 2つの数の和
|
| コンテスト | |
| ユーザー |
yamax3232
|
| 提出日時 | 2018-08-10 11:52:55 |
| 言語 | Java (openjdk 23) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 568 bytes |
| コンパイル時間 | 2,469 ms |
| コンパイル使用メモリ | 83,992 KB |
| 実行使用メモリ | 54,388 KB |
| 最終ジャッジ日時 | 2024-09-23 05:36:41 |
| 合計ジャッジ時間 | 7,132 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 21 |
ソースコード
package Main;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int count =0;
ArrayList<Integer> al=new ArrayList<Integer>();
ArrayList<Integer> wa=new ArrayList<Integer>();
Scanner kb=new Scanner(System.in);
int n=kb.nextInt();
int x=kb.nextInt();
for(int i=0;i<n;i++){
al.add(kb.nextInt());
}
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
wa.add(al.get(i)+al.get(j));
}
}
for(int sum:wa){
if(sum==x){
count++;
}
}
System.out.println(count);
}
}
yamax3232