CodeForces 791A Bear and Big Brother
来源:互联网 发布:php websocket 框架 编辑:程序博客网 时间:2024/05/29 13:57
题目链接:http://codeforces.com/contest/791/problem/A
题意:给你一个a,一个b,a每天都乘3,b每天都乘2,问你几天后a超过b
解析:a,b都不大,直接模拟即可
#include <cstdio>#include <cstring>#include <algorithm>#include <cmath>#include <iostream>using namespace std;const int maxn = 2e5+100;int main(){ int a,b; int ans = 0; scanf("%d %d",&a,&b); while(a<=b) { a *= 3; b *= 2; ans++; } printf("%d\n",ans); return 0;}
0 0
- CodeForces 791A Bear and Big Brother
- Codeforces Bear and Big Brother
- A. Bear and Big Brother
- Codeforces Round #405 A. Bear and Big Brother
- Codeforces791A Bear and Big Brother
- Codeforces 385A Bear and Raspberry
- CodeForces 574A - Bear and Elections
- Codeforces Round #318 A. Bear and Elections
- CodeForces #318 (div1) A.Bear and Poker
- Codeforces 574 A. Bear and Elections
- Codeforces 573 A. Bear and Poker
- Codeforces 574 A. Bear and Elections
- CodeForces 385A Bear and Raspberry
- Codeforces 653A Bear and Three Balls
- codeforces->653A. Bear and Three Balls
- Codeforces 658A Bear and Reverse Radewoosh
- CodeForces 658A Bear and Reverse Radewoosh
- 【CodeForces】[658A]Bear and Reverse Radewoosh
- 操作系统作业03
- Unity3d知识点
- SVN分支/合并原理及最佳实践1
- 修改VS模板并添加版权注释信息
- JavaScript 中 闭包 的详解
- CodeForces 791A Bear and Big Brother
- maven安装和配置
- Java中Date与String的相互转换
- 移动端布局方式
- 关于常量修改
- 表单提交到后台乱码与mysql乱码d
- Python爬虫之bs4库
- 最新版2017-03-02版树莓派系统不能直接SSH登录的问题
- JAVA解析xml的五种方式比较