A728号题解
2026-09-27 17:57:54
发布于:浙江
每日一题
A728号题解:
t题目:
Description of the question
The teacher gave Xiaoma a task: go to the stationery store and buy as many signature pens as possible. It is known that the price of a pen is 1 Yuan 9 The teacher gave Xiaoma Jun the money he was paying for a Yuan b Corner, Xiao Ma Jun wants to know how many pens he can buy at most.
Input format
The input consists of only one line containing two integers, representing them respectively a And b。
Output format
Output one line with one integer, indicating the maximum number of pens Xiaoma Jun can buy.
t题解:
#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
int total = a * 10 + b; // 总钱数,换算成"角"
int price = 19; // 一支笔 1元9角 = 19角
cout << total / price << '\n';
return 0;
}
记得三连哦!
全部评论 1
有帮助吗
2026-09-27 来自 浙江
1


















有帮助,赞一个