結果
| 問題 |
No.5 数字のブロック
|
| コンテスト | |
| ユーザー |
カニ戯(ry
|
| 提出日時 | 2015-02-26 17:51:25 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 329 bytes |
| コンパイル時間 | 2,033 ms |
| コンパイル使用メモリ | 74,464 KB |
| 実行使用メモリ | 48,096 KB |
| 最終ジャッジ日時 | 2024-06-23 23:49:35 |
| 合計ジャッジ時間 | 9,555 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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