結果

問題 No.842 初詣
ユーザー funakoshi
提出日時 2019-09-05 11:26:27
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 340 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 26,880 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2025-01-03 02:58:18
合計ジャッジ時間 1,260 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11 WA * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |     scanf("%d %d %d %d %d %d %d",&a,&b,&c,&d,&e,&f,&g);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
int main(void)
{
    int a,b,c,d,e,f,g,money;
    scanf("%d %d %d %d %d %d %d",&a,&b,&c,&d,&e,&f,&g);
    money=a*500+b*100+c*50+d*10+e*5+f;
    if(money==g)
    {
        printf("YES");
    }
    else
    {
        printf("NO");
    }
    
}
0