結果
問題 | No.508 超ゆとり教育 |
ユーザー |
![]() |
提出日時 | 2017-04-28 22:39:39 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 181 bytes |
コンパイル時間 | 399 ms |
コンパイル使用メモリ | 30,848 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 18:10:17 |
合計ジャッジ時間 | 1,023 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:17: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘double*’ [-Wformat=] 7 | scanf("%d",&n); | ~^ ~~ | | | | | double* | int* | %le main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d",&n); | ~~~~~^~~~~~~~~
ソースコード
#include<stdio.h>#include<math.h>#define PI_ 3int main(void){double n;int ans;scanf("%d",&n);ans=(int)pow(n/PI_,0.5);if(ans==0)ans++;printf("%d\n",ans);return 0;}