HBC14308Cow's Segment题解

庄子墨 算法基础篇 48 0
全网最全C++题库,助您快速提升编程技能!题库丰富多样,涵盖各个领域,让您在练习中不断成长!
Farmer John is playing math game with cows. To help his cows learning addition and multiplication, he invented a new game. In the beginning, he would provide two number a and b. After that, cows would report two number each turn. At the turn i, i*a and i*b should be reported. Once there exists an integer in the segment [i*a, i*b], the game ends. Now, John wants to know after how many turns the game would end. So, he ask for your help.

Farmer John is playing math game with cows. To help his cows learning addition and multiplication, he invented a new game. In the beginning, he would provide two number a and b. After that, cows would report two number each turn. At the turn i, i*a and i*b should be reported. Once there exists an integer in the segment [i*a, i*b], the game ends. Now, John wants to know after how many turns the game would end. So, he ask for your help.

HBC14308Cow's Segment题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
全网最全C++题库,助您挑战自我,突破极限,成为编程领域的佼佼者!

标签: HBC14308Cow's Segment题解