整数语法 [英] Integer syntax

查看:83
本文介绍了整数语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有十个人,每个人都被分配了一个号码(显然是1-10)。我需要将它们随机化,以便每个人的数字对应于一年中每个月的每一天。分配男人的日子必须是平等的。周末也必须相等。

I have ten men who each are assigned a number(obviously 1-10). I need to randomize them so that each man''s number corresponds to each day of the month for the year. The days that the men are assigned have to be equal. The weekends have to be equal as well.

推荐答案

好的。你是否需要帮助尝试这样做?


这些数字最终不会完全相同,因为365/10是36.5,所以有些人会有36天37天。
OK. Did you need help trying to do this?

The numbers won''t end up being exactly equal, as 365 / 10 is 36.5, so some men will have 36 days and 37 days.



好​​的。你是否需要帮助尝试这样做?


这些数字最终不会完全相同,因为365/10是36.5,所以有些人会有36天37天。
OK. Did you need help trying to do this?

The numbers won''t end up being exactly equal, as 365 / 10 is 36.5, so some men will have 36 days and 37 days.



如果你有时间我会很感激。


If you have the time I would appreciate it.


我要做的是为每个人分配一个0的数字 - 9然后使用Modulo 10为每个人分配日期。这并不是完全随机的,因为每个人每10天就会出现一次。
What I would do is assign each person a number from 0 - 9 and then use a Modulo 10 to assign days to each person. This isn''t entirely random as each person will come up every 10th day.


这篇关于整数语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆