結果

問題 No.328 きれいな連立方程式
コンテスト
ユーザー testestest
提出日時 2015-12-21 19:24:42
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 241 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 115 ms
コンパイル使用メモリ 28,868 KB
最終ジャッジ日時 2026-02-23 20:14:35
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 30
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:3:1: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
    3 | scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
      | ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
  +++ |+#include <stdio.h>
    1 | double a,b,c,d;
main.c:6:1: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
    6 | printf("%f %f %f %f",a,b,c,d);
      | ^~~~~~
main.c:6:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’

ソースコード

diff #
raw source code

double a,b,c,d;
main(){
scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
if(a==0){puts("R");return 0;}
b/=a;c/=a;d/=a;a=b*b-c;
printf("%f %f %f %f",a,b,c,d);
if(a<1e-7){puts("R");return 0;}
if(b*b*b-3*a*b-d>1e-7){puts("R");return 0;}
puts("I");return 0;
}
0