結果
問題 | No.656 ゴルフ |
ユーザー |
![]() |
提出日時 | 2019-07-19 16:19:59 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 257 bytes |
コンパイル時間 | 598 ms |
コンパイル使用メモリ | 29,312 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 00:07:52 |
合計ジャッジ時間 | 1,006 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
#include <stdio.h> int main(void){ char score[10]; int hit; int sum = 0; scanf( "%s", score ); for( int i = 0; i < 9; i++ ){ hit = (int)( score[i] - '0' ); sum += ( hit <= 0 ) ? 10 : hit; } printf( "%d", sum ); }