【HDU 5660】【水题】jrMz and angles
来源:互联网 发布:自动缝包机 知乎 编辑:程序博客网 时间:2024/05/19 06:39
题意:
jrMz有两种角,第一种角都是正n边形的内角,第二种角都是正m边形的内角。jrMz想选出其中一些,某种角可以选多个或一个都不选,使得选出的所有角的度数之和恰好为360度。jrMz想知道这是否可能实现。
昨晚打比赛遇到的,水,不到五分钟就a了。剩下的题目明天再来,好吧,作为渣渣没资格说题目水,每次HACK的时候我都在宵夜,宵夜误事啊,只不过这次排名升了好开心。#include "stdio.h"int main(int argc, char const *argv[]){ int t,flag; int a,b; double j1,j2; scanf("%d",&t); while(t--) { int i,j; flag=0; scanf("%d %d",&a,&b); j1=180.0*(a-2)/a; j2=180.0*(b-2)/b; for (i = 0; i<=105; ++i) for (j = 0; j<=105; ++j) { if((i*j1+j*j2)==360) { flag=1; break; } } if(flag) printf("Yes\n"); else printf("No\n"); } return 0;}
0 0
- 【HDU 5660】【水题】jrMz and angles
- hdu 5660 jrMz and angles(水题)
- HDU jrmz and angles
- hdu 5660 jrMz and angles【暴力枚举】【水题】
- BC-水题 jrMz and angles
- BestCoder Round #79 1001/hdu 5660 jrMz and angles
- HDU 5660/BC 79A jrMz and angles
- 【杭电】[5660]jrMz and angles
- 杭电5660 jrMz and angles
- jrMz and angles
- jrMz and angles
- jrMz and angles
- jrMz and angles 暴力
- HDU 5560 jrMz and angles(简单暴力枚举)
- BC之jrMz and angles
- bestcoder Round #79 (div.2)jrMz and angles
- BestCoder Round #79 (div.2)-jrMz and angles,,暴力求解~
- UVA 1643(p343)----Angles and Squares
- CardView 设置 match_parent 无效 而且 动画效果无效
- algorithm-dp
- volatile
- CALayer
- IOS开发之旅-IOS常用数据结构NSArray、NSMutableArray、NSDictionary、NSMutableDictionary介绍
- 【HDU 5660】【水题】jrMz and angles
- java内存区域与对象的访问
- android自定义控件基础
- .NET魔法堂:工程构建基石->MSBuild
- 蓝桥杯1
- Java入门 第一季第二章 变量和常量
- JavaScript语言精粹之函数篇(二)
- Android PullToRefresh——ListView使用详解
- tomcat安装和启动