来源:​​​​​​https://codeforces.com/contest/46/problem/A

Ball Game

A kindergarten teacher Natalia Pavlovna has invented a new ball game. This game not only develops the children's physique, but also teaches them how to count.

The game goes as follows. Kids stand in circle. Let's agree to think of the children as numbered with numbers from 1 to n clockwise and the child number 1 is holding the ball. First the first child throws the ball to the next one clockwise, i.e. to the child number 2. Then the child number 2 throws the ball to the next but one child, i.e. to the child number 4, then the fourth child throws the ball to the child that stands two children away from him, i.e. to the child number 7, then the ball is thrown to the child who stands 3 children away from the child number 7, then the ball is thrown to the child who stands 4 children away from the last one, and so on. It should be mentioned that when a ball is thrown it may pass the beginning of the circle. For example, if n = 5, then after the third throw the child number 2 has the ball again. Overall, n - 1 throws are made, and the game ends.

The problem is that not all the children get the ball during the game. If a child doesn't get the ball, he gets very upset and cries until Natalia Pavlovna gives him a candy. That's why Natalia Pavlovna asks you to help her to identify the numbers of the children who will get the ball after each throw.

Input

The first line contains integer n (2 ≤ n ≤ 100) which indicates the number of kids in the circle.

Output

In the single line print n - 1 numbers which are the numbers of children who will get the ball after each throw. Separate the numbers by spaces.

Examples

input

Copy

10

output

Copy

2 4 7 1 6 2 9 7 6

input

Copy

3

output

Copy

2 1

翻译:

‎幼儿园老师娜塔莉亚·帕夫洛夫娜(Natalia Pavlovna)发明了一种新的球类运动。这个游戏不仅培养了孩子们的体格,还教他们如何数数。‎

‎游戏如下。孩子们围成一圈。让我们同意将孩子视为顺时针从‎‎1‎‎到‎‎n‎‎的数字编号,而孩子数字‎‎1‎‎正在握球。首先,第一个孩子顺时针方向将球扔给下一个孩子,即‎‎向2号‎‎孩子投掷。然后,‎‎2‎‎号孩子把球扔给下一个但一个孩子,即‎‎4‎‎号孩子,然后第四个孩子把球扔给离他两个孩子的孩子,即‎‎7‎‎号孩子,然后球扔给站在‎‎3‎‎个孩子远离‎‎7‎‎号孩子的孩子身上, 然后球被扔给站在离最后‎‎一个孩子4‎‎个孩子远的孩子身上,依此类推。应该提到的是,当一个球被抛出时,它可能会通过圆圈的开始。例如,如果 ‎‎n‎‎ = 5‎‎,则在第三次投掷后,‎‎2‎‎ 号子项再次拥有球。总体而言,‎‎进行了n-1‎‎次投掷,游戏结束。‎

‎问题是,并非所有的孩子都能在比赛中拿到球。如果一个孩子没有得到球,他会非常生气并哭泣,直到纳塔利娅·帕夫洛夫娜给他一颗糖果。这就是为什么娜塔莉亚·帕夫洛夫娜(Natalia Pavlovna)要求你帮助她确定每次投掷后会得到球的孩子的数量。‎

‎输入‎

‎第一行包含整数 ‎‎n‎‎(‎‎2 ≤ ‎‎n‎‎ ≤ 100‎‎),表示圆圈中的孩子数。‎

‎输出‎

‎在单行打印‎‎n‎‎ - 1‎‎数字,这是每次投掷后将获得球的孩子的数量。用空格分隔数字。‎

Ball Game(翻译)相关推荐

  1. javaone_JavaOne 2012:调查JVM水晶球

    javaone 我周一回到了希尔顿的A / B广场参加第四届会议,但首先去了希尔顿的顶层收拾午餐. 我每年都在JavaOne的第一天被提醒,对于参与的每个人来说,第一天的午餐获取过程令人惊讶地令人沮丧 ...

  2. JavaOne 2012:调查JVM水晶球

    我回到了希尔顿的A / B广场参加星期一的第四届会议,但首先去了希尔顿的顶层收拾午餐. 我每年都在JavaOne的第一天被提醒,涉及到每个人的第一天的午餐获取过程令人惊讶地令人沮丧. 我知道我在Jav ...

  3. 如何用技术搞好英俄翻译?

    神经网络翻译模型受限于其可以使用的词表大小,经常会遇到词表无法覆盖源端和目标端单词的情况,特别是当处理形态丰富的语言(例如俄语.西班牙语等)的时候,词表对全部语料的覆盖度往往不够,这就导致很多&quo ...

  4. 4图纸 rust_安诺伊模具丨机加工图纸有英语看不懂?不怕!史上最全翻译都在这...

    机械图纸英语翻译 ALL WELDS CONTINUOUS UNLESS OTHERWISE STATED 未注焊缝均为连续焊 ALL WELDS 3mm FILLET UNLESS OTHERWIS ...

  5. 篮球英文术语翻译与解释 (以A至E为限)

    过去和指导教授郑老师.李鸿棋老师把常见篮球英文术语翻成中文:今天我们再努力,修改部分中译.且再深入予以解释.我们目标:就算读者不懂篮球,看这些翻译.解释后,也能了解篮球:因此,如果解释有不通顺.不明白 ...

  6. 关于计算机的英语作文带翻译100字,求30篇100字英语作文带翻译

    求30篇100字英语作文带翻译以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 求30篇100字英语作文带翻译 你搜索一下 ...

  7. Thinking in React(翻译)

    以下是React官方文档中的Thinking inReact文章的翻译,第一次翻译英文的文章,肯定有很多不正确的地方,还望多多包涵. 原文地址:https://facebook.github.io/r ...

  8. NBA live 08 游戏解说翻译和球队战术

    boston pg传给sf由sf组织进行,pg由于pf和c单挡走底线,sg在另一个外线埋伏,sf主要有三点可以传:pg,走了一大段路,他自己会是首选,在这个位置可以射可传,但现在的凯尔特人队应该少这样 ...

  9. 七年级上册英语第三单元单词课文翻译

    英语七年级上册1~3课 课文单词神马的...速度求 . 小朋友,课后要好好背单词哈~第一单元单词及短语1.my我的pron.2.name名字n.3.is是v.4.clock时钟n.5.I我pron.6 ...

最新文章

  1. 图像拼接--Parallax-tolerant Image Stitching
  2. 蓝盾第三代AI防火墙分析
  3. 怎么用python画简单的图-python中简单易学的绘图:用turtle画太极图
  4. 知识复习:nlp算法面试汇总
  5. Receiver type ‘X’ for instance message is a forward declaration
  6. DevExpress GridControl使用方法
  7. Java:Eclipse下载安装教程,以及Eclipse 安装汉化包的方法
  8. 嵌入式linux UBoot移植篇
  9. php时间戳怎么转换成时间格式,php时间戳如何转换为时间格式
  10. 北京环球度假区宣布首批21家旅游渠道官方授权合作伙伴
  11. 手机模拟门禁卡!NFC蓝牙读卡器!
  12. 微信模拟地理位置_伪装微信地理位置
  13. Jenkins平台搭建
  14. 精华 | 网络故障排除命令汇总【网工必须收藏】
  15. python如何设置窗口为活动窗口
  16. 使用java抓取金山词霸的每日一句
  17. 基于java的网上鲜花销售系统,基于JAVA的鲜花销售管理系统MVC开发,免费分享
  18. 脱水马铃薯的全球与中国市场2022-2028年:技术、参与者、趋势、市场规模及占有率研究报告
  19. Socket 对外接口 (一)
  20. 20200329——剑指offer 面试题49:丑数

热门文章

  1. redhat Enterprise Linux Server release 7.2(Maipo) 安装redis-stat
  2. win10删除历史壁纸记录
  3. 二叉树的前序、中序、后序遍历(保姆级分析,建议收藏~)
  4. 微服务的4个设计原则和19个解决方案 1
  5. Win10 无线投屏/无线屏幕拓展
  6. 用友YonSuite与旺店通数据集成对接-技术篇2
  7. 金蝶云星空与旺店通集成解决方案(旺店通主管库存)
  8. 人工智能、核战争与白宫陷落
  9. Windows Azure案例:迈阿密市政府使用“云”平台改善服务方案,降低运营成本
  10. 进入Recovery模式方法