UVA 1636 Headshot——概率水题
来源:互联网 发布:mars安卓视频教程json 编辑:程序博客网 时间:2024/05/29 03:03
#include <cstdio>#include <cstring>using namespace std;int main() { char str[110]; while (gets(str) != NULL) { int a = 0, b = 0, c = strlen(str); for (int i = 0; i < c - 1; i++) { if (str[i] == '0') { a++; if (str[i + 1] == '0') b++; } } if (str[c - 1] == '0') { a++; if (str[0] == '0') b++; } double shoot = 1.0 * b / (1.0 * a); double rotat = 1.0 * a / (1.0 * c); if (shoot == rotat) printf("EQUAL\n"); else if (shoot > rotat) printf("SHOOT\n"); else printf("ROTATE\n"); } return 0;}
阅读全文
1 0
- UVA 1636 Headshot——概率水题
- UVA 1636 Headshot 概率
- UVa--1636 Headshot(概率)
- UVA.1636 Headshot (概率)
- UVa 1636 - Headshot(概率)
- UVa 1636 - Headshot(概率)
- uva 1636 Headshot 简单概率
- UVA 1636 Headshot(概率)
- uva 1636 - Headshot(简单概率问题)
- UVA-1636-Headshot
- UVA 1636 - Headshot
- UVa 1636 Headshot
- UVA 1636(p326)----Headshot
- uva 1636 Headshot
- UVa 1636 Headshot
- UVa 1636 Headshot
- UVa 1636 Headshot
- UVA 1636 Headshot
- list4
- java求解给定一整数和指定指数求解计算结果
- Eclipse离线安装Java Decompiler插件
- Milk HDU
- MainActivity.java11listviewmutilitemload(listview多条目加载
- UVA 1636 Headshot——概率水题
- 实践-oracle中出现:ORA-00911: invalid character的问题
- 一分钟了解“matlab分别赋值函数deal”
- Maven:解决“Could not calculate build plan”问题
- 文件管理【Ubuntu-shell】
- vue.js 学习之组件之间数据传递详解
- ubuntu系统tmp文件夹内文件重启自动删除与恢复
- 输入10个数,找出其中绝对值最小的数,将它和最后一个数交换,然后输出这10个数。
- IDEA中运行.dll(JNI)