题目链接:http://codeforces.com/contest/1100/problem/C

题目大意:给你n和r,n指的是有n个圆围在里面的圆的外面,r指的是里面的圆的半径,然后让你求外面的圆的半径。

具体思路:,我们就可以列出等式,sin(2*pi/(2*n))=R/(R+r).

然后就直接解等式就可以了。

AC代码:

 #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <map>
#include <vector>
#include <queue>
using namespace std;
# define ll long long
# define pi acos(-1.0)
const int maxn = 1e5+;
int main()
{
double n,r;
scanf("%lf %lf",&n,&r);
printf("%.8lf\n",sin(pi/(n))*r/(1.0-sin(pi/(n))));
return ;
}

C. NN and the Optical Illusion(几何)的更多相关文章

  1. CF 1100C NN and the Optical Illusion(数学)

    NN is an experienced internet user and that means he spends a lot of time on the social media. Once ...

  2. 1100C NN and the Optical Illusion

    推公式,水题.cos()函数是默认弧度制的 #include <iostream> #include <cstring> #include <string> #in ...

  3. CodeForces-1100C NN and the Optical Illusion 简单数学

    题目链接:https://vjudge.net/problem/CodeForces-1100C 题意: 题目给出外部圆的数目n和内部圆的半径r,要求求出外部圆的半径以满足图片要求. 显然这是一道数学 ...

  4. NN and the Optical Illusion-光学幻觉 CodeForce1100C 几何

    题目链接:NN and the Optical Illusion 题目原文 NN is an experienced internet user and that means he spends a ...

  5. Codeforces Round #532(Div. 2) C.NN and the Optical IIIusion

    链接:https://codeforces.com/contest/1100/problem/C 题意: 一个圆球外面由其他圆球包裹,两两相连. 给出n,r. n为外面圆球数量,r为内部圆球半径. 求 ...

  6. Codeforces 1100 - A/B/C/D/E/F - (Undone)

    链接:https://codeforces.com/contest/1100 A - Roman and Browser - [暴力枚举] 题意:浏览器有 $n$ 个网页,编号 $1 \sim n$, ...

  7. Codeforces Round #532

    以后不放水题了 C.NN and the Optical Illusion 复习一下高中数学即可 $\frac{ans}{ans+r}=\sin \frac{\pi}{n}$ 解方程 #include ...

  8. Codeforces Round #532 (Div. 2) Solution

    A. Roman and Browser 签到. #include <bits/stdc++.h> using namespace std; ]; int get(int b) { ]; ...

  9. Codeforces Round #532 (Div. 2) 题解

    Codeforces Round #532 (Div. 2) 题目总链接:https://codeforces.com/contest/1100 A. Roman and Browser 题意: 给出 ...

随机推荐

  1. HAOI2017 新型城市化 二分图的最大独立集+最大流+强连通缩点

    题目链接(洛谷):https://www.luogu.org/problemnew/show/P3731 题意概述:给出一张二分图,询问删掉哪些边之后可以使这张二分图的最大独立集变大.N<=10 ...

  2. Linux命令常用

    数据库:查看日志 vim /var/log/mysqld.log

  3. 小程序 JM

    // 本地 // 'https://ly.com/' // 短信验证码参数: let dataValue = { 'type': 1, mobile: '13615814562' }; dataVal ...

  4. 关于“代码规范”,“Review”和“Check list”

    关于“代码规范”,“Review”和“Check list”,就我个人理解,这三者相辅相成.代码规范是在编程时就该注意的,为Review减轻负担.而要进行Review,又需要一个Check list作 ...

  5. Windows 64位环境的Java 服务配置

    有个任务,需要远程起调Windows64服务器下的程序,那么需要在Windows服务器中注入一个deamon服务,都知道Linux环境做成后台服务非常简单,nohup &很快能解决问题,但wi ...

  6. Java反射的用法

    Class类 在Java中,每个class都有一个相应的Class对象.也就是说,当我们编写一个类,编译完成后,在生成的.class文件中,就会产生一个Class对象,用于表示这个类的类型信息. 反射 ...

  7. js中的async await

    JavaScript 中的 async/await 是属于比较新的知识,在ES7中被提案在列,然而我们强大的babel粑粑已经对它进行列支持! 如果开发中使用了babel转码,那么就放心大胆的用吧. ...

  8. 关于django-rest-freamwork中的View

    view > views.APIView > generics.GenericAPIView > viewsets.GenericViewSet 1.APIView(继承 view) ...

  9. MySQL5.7安装(RPM)笔记

    1. 检查MySQL是否安装,如果有安装,则移除(rpm –e 名称)[root@localhost ~]# rpm -qa | grep -i mysqlmysql-libs-xxxxxxxxxx. ...

  10. Day25-博客系统

    1. 搭建环境请参考:http://www.cnblogs.com/momo8238/p/7508677.html 2.创建3张表备用 models.py from django.db import ...