結果
| 問題 |
No.1487 ぺんぎんさんかっけー
|
| コンテスト | |
| ユーザー |
Nachia
|
| 提出日時 | 2021-04-23 22:08:09 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 1,000 ms |
| コード長 | 342 bytes |
| コンパイル時間 | 1,042 ms |
| コンパイル使用メモリ | 81,008 KB |
| 最終ジャッジ日時 | 2025-01-20 23:56:18 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 37 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | double a,b,c; scanf("%lf%lf%lf",&a,&b,&c);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0; i<(n); i++)
int main(){
double p = 0.25;
double a,b,c; scanf("%lf%lf%lf",&a,&b,&c);
double s = (a+b+c)/2;
double S = sqrt(s*(s-a)*(s-b)*(s-c));
double ans = S * p;
printf("%.10f\n",ans);
return 0;
}
Nachia