結果
| 問題 |
No.8010 Print inside /bin
|
| コンテスト | |
| ユーザー |
ぴろず
|
| 提出日時 | 2015-05-04 00:13:53 |
| 言語 | Java (openjdk 23) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 622 bytes |
| コンパイル時間 | 3,145 ms |
| コンパイル使用メモリ | 76,736 KB |
| 実行使用メモリ | 59,112 KB |
| 最終ジャッジ日時 | 2024-07-05 18:06:50 |
| 合計ジャッジ時間 | 7,654 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 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) {
if (sc.hasNext()) {
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);
}
}
}
ぴろず