結果

問題 No.656 ゴルフ
ユーザー greentea011
提出日時 2019-04-01 10:27:17
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 179 bytes
コンパイル時間 407 ms
コンパイル使用メモリ 31,232 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-24 16:04:10
合計ジャッジ時間 1,015 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
int main() {
    char s[11];
    int ans=0;
    scanf("%s",s);
    for (int i=0;i<9;i++){
        ans+=(s[i]=='0')?10:s[i]-'0';
    }
    printf("%d\n",ans);
}
0