結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
カニ戯(ry
|
| 提出日時 | 2015-02-26 17:51:25 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 329 bytes |
| 記録 | |
| コンパイル時間 | 1,415 ms |
| コンパイル使用メモリ | 83,880 KB |
| 実行使用メモリ | 49,180 KB |
| 最終ジャッジ日時 | 2026-07-28 09:12:00 |
| 合計ジャッジ時間 | 6,963 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 WA * 7 RE * 7 |
ソースコード
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] a) {
Scanner s=new Scanner(System.in);
int L=s.nextInt(),N=s.nextInt(),i=0,Z=0;
int[] B=new int[N];
while(s.hasNext())B[i++]=s.nextInt();
Arrays.sort(B);
for(i=0;L>(Z+=B[i++]););
System.out.println(i-1);
}
}
カニ戯(ry