Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

ABR0008 - Периметр

r радиустай тойрогт багтсан зөв n өнцөгтийн периметрийг ол. Пи тоог 3.14-тэй тэнцүү гэж үз.

Input

r - бутархай тоо ба n > 2 натурал тоонууд зайгаар тусгаарлагдан өгөгдөнө

Output

Периметрийн утга, таслалаас хойш нэг оронгийн нарийвчлалтайгаар

Example

Input:
10 6

Output:
60.0

Нэмсэн:sw40
Огноо:2007-10-16
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:Бүгд дараах хэлүүдээс бусад: ADA95 ASM64 BASH BF C++ 4.3.2 C99 CLPS CLOJURE D ERL FSHARP GO ICON ICK JS-RHINO LUA NEM NICE NODEJS OCAML PERL6 PIKE PRLG-swi SCALA SCM guile SCM qobi SED ST TCL WHITESPACE
Эх сурвалж:Абрамов С. А.

hide comments
2016-04-10 08:14:03
C++ deer neg iimerhuu
#include <iostream>
#include<cmath>
using namespace std;
int main() {
float n,r;
cin>>r>>n;
cout.setf(ios::fixed|ios::showpoint);
cout.precision(1);
cout <<n*sqrt(2*r*r*(1-fabs(cos(360/n*3.14/180))));
return 0;
}
2015-11-29 08:52:03
INGEED L BOLOO SHDEE

#include <stdio.h>
#include <math.h>
int main(){
float ontsog,n,r,p;
scanf ("%f%f",&r,&n);
ontsog=cos(360/n*3.14/180);
p=n*sqrt(2*r*r*(1-fabs(ontsog)));
printf ("%.1f",p);
}
2013-11-06 03:33:50 123
тийм
2013-03-20 11:23:04 TukaTuka
Yooo ene ymar choglogo bodlogo ve :P
Minii code zuv murtluu tentsehq bhiin :))
#include <stdio.h>
#include <math.h>
#define PI 3.14159265
int main(){
int r, n;
float degree;
scanf ("%d%d",&r,&n);
degree=cos (360/n*PI/180);
if (degree<0)
degree=degree*(-1);


printf ("%.1f",n*sqrt( 2 * r * r *(1 - cos(360/n*PI/180))));

}
2012-01-15 10:17:58 nasanbat
ene yag zow ajiljiin gehdee bodolt zow gehgui bna
2012-01-15 10:17:20 nasanbat
#include<iostream.h>
#include<math.h>
#define PI 3.14159265
int main(){
float p,c,r,a,x,y,R,b;
int n;
cin>>r>>n;
a=360/n;
b=cos(a*PI/180);
R=pow(r,2);
y=R+R-2*R*b;
c=sqrt(y);
cout.setf(ios::fixed|ios::showpoint);
cout.precision(1);
cout<<c*n;
}
2011-10-17 09:53:41 enkhtsolmon
double bolgood lf -r format hiisen ch tentsehgui bna
2011-10-17 09:53:04 enkhtsolmon
ene codond aldaa bhgui mortloo tentsehgui bhiin
2011-10-17 09:52:36 enkhtsolmon
Yahaar iim sonin bdag bnaa
:D

#include <stdio.h>
#include <math.h>

int main ()
{
float radius, pi = 3.14;
int n;

scanf("%f %d", &radius, &n);

float s = 0.5 *radius * radius * n * sinf((360 / n) * (pi / 180));
float p = 2 * s / (radius * cosf((180 / n) * pi / 180));

printf("%0.1f", p);
return 0;
}
2009-09-04 13:04:16 sw09d064
Margad_erdene
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.