結果
問題 | No.8010 Print inside /bin |
ユーザー |
![]() |
提出日時 | 2015-05-04 00:04:37 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 6 ms / 1,500 ms |
コード長 | 437 bytes |
コンパイル時間 | 10,729 ms |
コンパイル使用メモリ | 227,192 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-10 03:59:44 |
合計ジャッジ時間 | 11,575 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
package mainimport ("fmt""io/ioutil""log""sort""strings")func main() {const path = "/bin"files, err := ioutil.ReadDir(path)if err != nil {log.Fatal(err)return}names := make([]string, 0, len(files))for _, f := range files {name := f.Name()if strings.HasPrefix(name, ".") {continue}names = append(names, name)}sort.Strings(names)for _, name := range names {fmt.Println(name)}}