結果
問題 |
No.98 円を描こう
|
ユーザー |
|
提出日時 | 2015-06-03 17:25:58 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 241 bytes |
コンパイル時間 | 497 ms |
コンパイル使用メモリ | 58,864 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-06 13:54:35 |
合計ジャッジ時間 | 939 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:9:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d %d", &xp, &yp); | ~~~~~^~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream> #include <cstdio> #include <cmath> using namespace std; # define M_PI 3.14159265358979323846 int main() { int xp, yp; scanf("%d %d", &xp, &yp); printf("%d", (int)(sqrt(xp * xp + yp * yp) * 2) + 1); return 0; }