結果

問題 No.656 ゴルフ
ユーザー KakisukeKakisuke
提出日時 2018-12-28 13:59:45
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 254 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 20,480 KB
実行使用メモリ 6,952 KB
最終ジャッジ日時 2024-04-09 03:12:33
合計ジャッジ時間 872 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 1 ms
6,948 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 0 ms
6,948 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf(" %d",&score[i]);
      |         ^~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
int main()
{
    int score[9],sum=0,i;
    for(i=0;i<9;i++){
        scanf(" %d",&score[i]);
        if(score[i]==0){
            sum+=10;
        }else{
            sum+=score[i];
        }
    }
    printf("%d\n",sum);
    return 0;
}
0