BestCoder Round #79 1001/hdu 5660 jrMz and angles
来源:互联网 发布:excel选择重复数据 编辑:程序博客网 时间:2024/06/05 16:48
题目链接
题意:给出一个正n边形的角,一个正m边形的角。判断这些角能否组成360度。
注意取值非负。
#include<iostream>#include<cstdio>using namespace std;int main(){ int T; cin>>T; while(T--) { int n,m; cin>>n>>m; if(n<=2||m<=2) { cout<<"No"<<endl; continue; } int flag=0; for(int i=0;i*n*(m-2)<=2*n*m;i++) if((2*n*m-i*n*(m-2))%(m*(n-2))==0) flag=1; if(flag) cout<<"Yes"<<endl; else cout<<"No"<<endl; } return 0;}
0 0
- BestCoder Round #79 1001/hdu 5660 jrMz and angles
- bestcoder Round #79 (div.2)jrMz and angles
- BestCoder Round #79 (div.2)-jrMz and angles,,暴力求解~
- HDU jrmz and angles
- HDU 5660/BC 79A jrMz and angles
- 【HDU 5660】【水题】jrMz and angles
- hdu 5660 jrMz and angles(水题)
- hdu 5660 jrMz and angles【暴力枚举】【水题】
- 【杭电】[5660]jrMz and angles
- 杭电5660 jrMz and angles
- jrMz and angles
- jrMz and angles
- jrMz and angles
- jrMz and angles 暴力
- 【BestCoder Round #79 (div.2)】HDU5660jrMz and angles
- HDU 5560 jrMz and angles(简单暴力枚举)
- BC-水题 jrMz and angles
- BC之jrMz and angles
- 【转】zhihu图片下载工具
- The remote server returned an error: (403) Forbidden.
- 从 C/C++ 程序调用 Java 代码
- Quartz2动态化,实现增删改等操作。
- Command /usr/bin/codesign failed with exit code 1
- BestCoder Round #79 1001/hdu 5660 jrMz and angles
- MySQL基本用法
- PHP PDO ACCESS 留言板-退出
- 文件下载
- JAVA SOCKET编程
- 使用struts2实现下载功能遇到的文件中文问题解决经验分享
- stopPropagation, preventDefault 和 return false 的区别
- Android ImageView的scaleType属性与adjustViewBounds属性与图片自适应问题
- 工欲善其事,必先利其器——React Native的 IDE