結果
問題 |
No.1622 三角形の面積
|
ユーザー |
|
提出日時 | 2025-02-09 11:39:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 783 ms |
コンパイル使用メモリ | 62,780 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2025-02-09 11:40:10 |
合計ジャッジ時間 | 1,348 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:12:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 12 | scanf("%d",&t); | ~~~~~^~~~~~~~~ main.cpp:14:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | scanf("%d",&r); | ~~~~~^~~~~~~~~
ソースコード
#include<iostream> #include<cmath> #include<cassert> #define rep(i,n) for(i=0;i<(int)(n);i++) using namespace std; typedef long long ll; typedef unsigned long long ull; int t,r; int main(){ scanf("%d",&t); while(t--){ scanf("%d",&r); printf("%.5f\n",3.0*sqrt(3)*r*r/4); } return 0; }