結果

問題 No.656 ゴルフ
ユーザー norioc
提出日時 2018-03-02 23:15:17
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 463 bytes
コンパイル時間 854 ms
コンパイル使用メモリ 105,304 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-13 00:00:47
合計ジャッジ時間 1,635 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

void main() {
    auto s = readln.chomp;
    int ans = 0;
    foreach (c; s) {
        if (c == '0') ans += 10;
        else ans += c - '0';
    }
    writeln(ans);
}
0