結果
| 問題 |
No.8010 Print inside /bin
|
| コンテスト | |
| ユーザー |
ぴろず
|
| 提出日時 | 2015-05-04 00:12:49 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 587 bytes |
| コンパイル時間 | 1,861 ms |
| コンパイル使用メモリ | 76,384 KB |
| 実行使用メモリ | 42,352 KB |
| 最終ジャッジ日時 | 2024-07-05 18:06:29 |
| 合計ジャッジ時間 | 2,634 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
ソースコード
package no3010;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Process pr = Runtime.getRuntime().exec("ls /bin -F");
Scanner sc = new Scanner(pr.getInputStream());
ArrayList<String> lis = new ArrayList<>();
try {
while(true) {
String s = sc.next();
if (s.startsWith(".") || s.endsWith("/")) {
continue;
}
lis.add(s);
}
}catch (Exception e) {
}
Collections.sort(lis);
for(String s: lis) {
System.out.println(s);
}
}
}
ぴろず