結果
問題 | No.3040 A + B Problem |
ユーザー | tsuishi |
提出日時 | 2021-01-21 13:56:16 |
言語 | C (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 107 bytes |
コンパイル時間 | 153 ms |
コンパイル使用メモリ | 26,392 KB |
実行使用メモリ | 4,500 KB |
最終ジャッジ日時 | 2023-08-26 01:10:26 |
合計ジャッジ時間 | 2,345 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
コンパイルメッセージ
main.c: 関数 ‘main’ 内: main.c:2:9: 警告: 関数 ‘scanf’ の暗黙的な宣言です [-Wimplicit-function-declaration] 2 | int a,b;scanf("%d%d",&a,&b);if(b<0){printf("%d - %d\n",a,-b);}else{printf("%d + %d\n",a,b);} | ^~~~~ main.c:1:1: 備考: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | int main(){ main.c:2:9: 警告: 組み込み関数 ‘scanf’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch] 2 | int a,b;scanf("%d%d",&a,&b);if(b<0){printf("%d - %d\n",a,-b);}else{printf("%d + %d\n",a,b);} | ^~~~~ main.c:2:9: 備考: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:2:37: 警告: 関数 ‘printf’ の暗黙的な宣言です [-Wimplicit-function-declaration] 2 | int a,b;scanf("%d%d",&a,&b);if(b<0){printf("%d - %d\n",a,-b);}else{printf("%d + %d\n",a,b);} | ^~~~~~ main.c:2:37: 備考: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:2:37: 警告: 組み込み関数 ‘printf’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch] main.c:2:37: 備考: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:2:68: 警告: 組み込み関数 ‘printf’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch] 2 | int a,b;scanf("%d%d",&a,&b);if(b<0){printf("%d - %d\n",a,-b);}else{printf("%d + %d\n",a,b);} | ^~~~~~ main.c:2:68: 備考: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
int main(){ int a,b;scanf("%d%d",&a,&b);if(b<0){printf("%d - %d\n",a,-b);}else{printf("%d + %d\n",a,b);} }