题目描述
小A 每分钟输入 120120120 个字符,UIM 每分钟输入 808080 个字符,UIM 比小A 先开始打字 121212 分钟,请问小A 开始打字多少时间后能赶上 UIM 的进度?
输入格式
不需要输入。
输出格式
请输出一个数字表示答案。这个数字是一个整数。
题目分析
目的:求出小A 开始打字多少时间后能赶上 UIM 的进度。
这是一个追击问题,相当于求解 80×12+80t=120t80\times 12 + 80t=120t80×12+80t=120t, 解得 t=12t=12t=12。
代码实现
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const int N = 1e5 + 5;
int main(){
cout<<(12*80)/40;
return 0;
}