結果
問題 |
No.723 2つの数の和
|
ユーザー |
![]() |
提出日時 | 2019-06-02 14:25:48 |
言語 | Java (openjdk 23) |
結果 |
TLE
|
実行時間 | - |
コード長 | 597 bytes |
コンパイル時間 | 3,528 ms |
コンパイル使用メモリ | 75,452 KB |
実行使用メモリ | 76,436 KB |
最終ジャッジ日時 | 2024-09-17 20:10:53 |
合計ジャッジ時間 | 8,648 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | TLE * 1 -- * 21 |
ソースコード
import java.util.Scanner; public class Question723 { public static void main(String[] args) { //long start = System.currentTimeMillis(); Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int X = sc.nextInt(); int result = 0; int[] Arys = new int[N]; for (int i = 0; i < N; i++) { Arys[i] = sc.nextInt(); } for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { if (X == Arys[i] + Arys[j]) { result++; } } } // long end = System.currentTimeMillis(); // System.out.println((end - start) + "ms"); System.out.println(result); } }