結果
問題 |
No.98 円を描こう
|
ユーザー |
![]() |
提出日時 | 2016-02-24 22:51:44 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 249 bytes |
コンパイル時間 | 124 ms |
コンパイル使用メモリ | 22,912 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 03:09:36 |
合計ジャッジ時間 | 644 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:9:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d %d",&x,&y); | ^~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> #include<math.h> int main() { int x,y; int d; double distance; scanf("%d %d",&x,&y); //原点から(x,y)の距離を計算 distance = sqrt(x*x + y*y); d = (int)(distance *2 +1); printf("%d",d); return 0; }