舞步模拟

在这里插入图片描述

#include<stdio.h>
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		if(n%5)
			printf("%d",n%5);/*1-4步最少一最多四加一块就是5只要保证偶数步(左右脚都有)右脚不管几步左脚都能补上*/
		else
			printf("-1\n");
	}
	return 0;
}
发布了40 篇原创文章 · 获赞 51 · 访问量 2529

猜你喜欢

转载自blog.csdn.net/weixin_45697774/article/details/102727637