1/20 Martial Arts Cheats~!

As the title!

Xiao Ming went to X cave to explore and found a damaged martial arts cheat book (more than 2000 pages! Of course it is a forgery).
He noticed: Page 10 and 11 of the book are on the same paper, but page 11 and 12 are not on the same paper.
Xiao Ming only wants to practice martial arts from page 81 to page 92 of the book, but doesn't want to bring the whole book. May I ask how many pieces of paper he must tear off at least to take away?

This question is quite simple. You can figure out the kind of...

code show as below:

#include <stdio.h>
int main()
{
    
    
	int first = 81;
	int end = 92;
	int a;
	a = (end - first + 1)/2;
	if(first%2==1&&end%2==0)
	{
    
    
		a++;
	}
	printf("%d",a);
}

bilibili video link
https://www.bilibili.com/video/BV1k54y1s7QB/

Guess you like

Origin blog.csdn.net/FG_future/article/details/112908641