Submission #00108


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
#include<iostream>
#include<cmath>
using namespace std;
main()
{
double r,x,y;int c=0;cin>>r;
for(x=-r;x<=r;x+=1.0)for(y=-r;y<=r;y+=1.0)
{
double b=hypot(x,y);c+=r>b-1e-9&&r<b+1e-9;
}
cout<<c<<endl;
}

ステータス

項目 データ
問題 0001 - コンパス
ユーザー名 kotatsugame
投稿日時 2017-03-30 21:20:16
言語 C++11
状態 Accepted
得点 5
ソースコード長 220 Byte
最大実行時間 61 ms
最大メモリ使用量 644 KB

セット

セット 得点 Cases
1 ALL 5 / 5 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
01.in AC 31 ms 480 KB
1
02.in AC 32 ms 468 KB
1
03.in AC 23 ms 448 KB
1
04.in AC 24 ms 556 KB
1
05.in AC 15 ms 532 KB
1
06.in AC 20 ms 644 KB
1
07.in AC 15 ms 628 KB
1
08.in AC 27 ms 484 KB
1
09.in AC 61 ms 596 KB
1
10.in AC 55 ms 580 KB
1