結果

問題 No.656 ゴルフ
ユーザー asdfghjkl;
提出日時 2020-03-09 01:00:14
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 29,056 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 20:21:52
合計ジャッジ時間 677 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(void){
char s[100];scanf("%s",s);
int sum=0;

for(int i=0;i<9;i++){
if(s[i]=='0'){sum=sum+10;}
else {sum=sum+s[i]-'0';}
}
printf("%d\n",sum);
}
0