結果

問題 No.442 和と積
ユーザー kotatsugamekotatsugame
提出日時 2017-08-11 06:26:08
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 125 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 28,160 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-20 21:52:54
合計ジャッジ時間 899 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 1 ms
6,940 KB
testcase_03 WA -
testcase_04 AC 1 ms
6,944 KB
testcase_05 AC 1 ms
6,944 KB
testcase_06 AC 1 ms
6,944 KB
testcase_07 WA -
testcase_08 AC 1 ms
6,944 KB
testcase_09 AC 1 ms
6,940 KB
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 -
testcase_20 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){scanf("%ld%ld",&a,&b);printf("%lu",(c=g(a+b,a))*g(a+b,a/c*b));}
      | ^~~~
main.c: In function 'main':
main.c:3:8: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | main(){scanf("%ld%ld",&a,&b);printf("%lu",(c=g(a+b,a))*g(a+b,a/c*b));}
      |        ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | long a,b,c;
main.c:3:8: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | main(){scanf("%ld%ld",&a,&b);printf("%lu",(c=g(a+b,a))*g(a+b,a/c*b));}
      |        ^~~~~
main.c:3:8: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:30: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    3 | main(){scanf("%ld%ld",&a,&b);printf("%lu",(c=g(a+b,a))*g(a+b,a/c*b));}
      |                              ^~~~~~
main.c:3:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:30: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:3:30: note: include '<stdio.h>' or provide a declaration of 'printf'

ソースコード

diff #

long a,b,c;
long g(a,b)long a,b;{return b?g(b,a%b):a;}
main(){scanf("%ld%ld",&a,&b);printf("%lu",(c=g(a+b,a))*g(a+b,a/c*b));}
0