結果
| 問題 | 
                            No.509 塗りつぶしツール
                             | 
                    
| コンテスト | |
| ユーザー | 
                             mosmos_21
                         | 
                    
| 提出日時 | 2017-04-29 21:52:01 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 253 bytes | 
| コンパイル時間 | 209 ms | 
| コンパイル使用メモリ | 20,608 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-13 19:17:33 | 
| 合計ジャッジ時間 | 1,121 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 WA * 17 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |     scanf("%d", &num);
      |     ^~~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
int main(){
    
    int sum = 0, c[10] = {1,0,0,0,1,0,1,0,2,1};
    int num;
    scanf("%d", &num);
    for(;num != 0; num /= 10){
        sum += 2;
        sum += c[num % 10];    
    }
    printf("%d\n", sum + 1);
    return 0;
}
            
            
            
        
            
mosmos_21