結果

問題 No.3010 Print inside /bin
ユーザー ぴろずぴろず
提出日時 2015-05-04 00:12:49
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 587 bytes
コンパイル時間 4,460 ms
コンパイル使用メモリ 74,076 KB
実行使用メモリ 58,132 KB
最終ジャッジ日時 2023-09-19 05:48:14
合計ジャッジ時間 4,656 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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);
		}
	}

}
0