Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the Forecast of Tortoise and Hare Race by integrating SpringBoot with MybatisPlus

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how SpringBoot integrates MybatisPlus to predict the race between the tortoise and the hare. It is very detailed and has a certain reference value. Interested friends must finish reading it!

Problem description

It is said that there are all kinds of rabbits and turtles in the world, but the study found that all rabbits and turtles have one thing in common-they like to race. So the race between tortoise and rabbit is constantly taking place in every corner of the world. Xiaohua is very interested in this, so he decides to study the race between different hare and tortoise. He found that although rabbits run faster than turtles, they have a well-known problem-pride and laziness, so in the race against turtles, once the rabbits find themselves ahead of t meters or more at the end of any second, they will stop to rest for s seconds. For different rabbits, the value of tmemory s is different, but all turtles are the same-they will never stop until they reach the finish line.

However, some races are quite long and it takes a lot of time to watch, and Xiaohua found that as long as the rabbit and tortoise data are recorded after the start of each race-the rabbit's speed v1 (meaning the rabbit can run v1 meters per second), the tortoise's speed v2, and the corresponding t, s values of the rabbit, as well as the length of the track-can predict the outcome of the race. But Xiaohua is very lazy and doesn't want to speculate the result of the game by hand, so he came to you-- a talented student in the computer department of Tsinghua University-- and asked for help. Please write a program to predict the result of the game for the input data of a game.

Input format

The input is only one line, including five positive integers separated by spaces, v1rec v2rec trewl, where (v1rec v2v2 > t > > s > > ltinct l1jurisdiction 0; / / the distance the hare walked int L2500; / / the distance the tortoise walked int flag_relax=0; / / the hare rest mark while (L1)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report