結果
| 問題 | No.9011 数字を全て足そう(数字だけ) |
| ユーザー |
fuzzball
|
| 提出日時 | 2018-01-29 13:38:26 |
| 言語 | Swift (6.3.3) |
| 結果 |
AC
不安定
|
| 実行時間 | 4 ms / 2,000 ms |
| + 254µs | |
| コード長 | 65 bytes |
| 記録 | |
| コンパイル時間 | 13,197 ms |
| コンパイル使用メモリ | 140,592 KB |
| 実行使用メモリ | 9,984 KB |
| 最終ジャッジ日時 | 2026-10-02 14:09:52 |
| 合計ジャッジ時間 | 15,339 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
コンパイルメッセージ
Main.swift:1:19: warning: 'flatMap' is deprecated: Please use compactMap(_:) for the case where closure returns an optional value [#DeprecatedDeclaration]
1 | print(readLine()!.flatMap {Int(String($0))}.reduce(0) {$0 + $1})
| |- warning: 'flatMap' is deprecated: Please use compactMap(_:) for the case where closure returns an optional value [#DeprecatedDeclaration]
| `- note: use 'compactMap(_:)' instead
2 |
[#DeprecatedDeclaration]: <https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration>
ソースコード
print(readLine()!.flatMap {Int(String($0))}.reduce(0) {$0 + $1})
fuzzball