結果

問題 No.442 和と積
ユーザー kotatsugamekotatsugame
提出日時 2017-08-11 06:23:51
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 121 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 29,184 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-20 21:52:53
合計ジャッジ時間 995 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

long a,b;
long g(a,b)long a,b;{return b?g(b,a%b):a;}
main(){scanf("%ld%ld",&a,&b);printf("%.f",fmax(g(a+b,a),g(a+b,b)));}
0