結果

問題 No.656 ゴルフ
ユーザー ichibanshibori
提出日時 2018-04-29 19:07:09
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 292 ms / 2,000 ms
コード長 164 bytes
コンパイル時間 10,248 ms
コンパイル使用メモリ 438,096 KB
実行使用メモリ 56,836 KB
最終ジャッジ日時 2024-11-20 15:51:45
合計ジャッジ時間 13,878 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args : Array<String>) {
         ^

ソースコード

diff #

fun main(args : Array<String>) {
	val S = readLine() ?: ""
	
	val a = S
	    .map { (it - '0').toInt() }
		.map { if (it == 0) 10 else it }
		.sum()
	
	println(a)
}
0