結果

問題 No.1119 Division 3
ユーザー goro gengoro gen
提出日時 2020-08-06 19:24:27
言語 C
(gcc 12.3.0)
結果
RE  
実行時間 -
コード長 286 bytes
コンパイル時間 495 ms
コンパイル使用メモリ 27,700 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 17:18:27
合計ジャッジ時間 3,248 ms
ジャッジサーバーID
(参考情報)
judge11 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function 'main':
main.c:7:16: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '1000000000000000' to '-1530494976' [-Woverflow]
    7 |     fgets(buf, sizeof(buf), stdin);
      |                ^~~~~~~~~~~
main.c:7:5: warning: argument 2 value -1530494976 is negative [-Wstringop-overflow=]
    7 |     fgets(buf, sizeof(buf), stdin);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:592:14: note: in a call to function 'fgets' declared with attribute 'access (write_only, 1, 2)'
  592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |              ^~~~~

ソースコード

diff #

#include<stdio.h>

int main (void)
{ 
    char buf[1000000000000000];
    long int i,n,l,m,sum;
    fgets(buf, sizeof(buf), stdin);
    sscanf(buf, "%d %d %d", &n,&m,&l);
    sum=n*m*l;
    if(sum%3==0){
        printf("Yes");
    }
    else{
        printf("No");
    }
    return 0;
}
0