杭电5138
来源:互联网 发布:java poi 下载 编辑:程序博客网 时间:2024/06/05 03:36
CET-6 test
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 569 Accepted Submission(s): 415
Problem Description
Small W will take part in CET-6 test which will be held on December 20th . In order to pass it he must remember a lot of words.
He remembers the words according to Ebbinghaus memory curve method.
He separates the words into many lists. Every day he picks up a new list, and in the next1st,2nd,4th,7th,15th day, he reviews this list.
So every day he has many lists to review. However he is so busy, he does not know which list should be reviewed in a certain day. Now he invites you to write a program to tell him which list should to be reviewed in a certain day.
Lists are numbered from 1. For example list 1 should be reviewed in the2nd,3rd,5th,8th,16th day.
He remembers the words according to Ebbinghaus memory curve method.
He separates the words into many lists. Every day he picks up a new list, and in the next
So every day he has many lists to review. However he is so busy, he does not know which list should be reviewed in a certain day. Now he invites you to write a program to tell him which list should to be reviewed in a certain day.
Lists are numbered from 1. For example list 1 should be reviewed in the
Input
Multi test cases (about 100), every case contains an integer n in a single line.
Please process to the end of file.
[Technical Specification]
2≤n≤100000
Please process to the end of file.
[Technical Specification]
Output
For each n,output the list which should be reviewed in the nth day in ascending order.
Sample Input
2100
Sample Output
185 93 96 98 99
Source
BestCoder Round #21
Recommend
heyang | We have carefully selected several similar problems for you: 5551 5550 5549 5548 5547
.....
#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;int n;int main(){while(scanf("%d",&n)!=EOF){if(n>15)printf("%d ",n-15);if(n>7)printf("%d ",n-7);if(n>4)printf("%d ",n-4);if(n>2)printf("%d ",n-2);printf("%d\n",n-1); }}
0 0
- 杭电5138
- 杭电
- 杭电
- 杭电
- 杭电5138-CET-6 test
- 杭电 1234 和 杭电 2115
- 杭电2056之Rectangles 杭电
- 杭电ACM1061Rightmost Digit
- 杭电2099 7.11
- 杭电ACM 1003
- 杭电 ACM 2016
- 杭电ACM1466
- 杭电ACM1003
- 杭电ACM1225
- 杭电ACM2023
- 杭电ACM2602
- 杭电ACM2955
- 杭电ACM3198
- 脚本结束 调用函数处理其他事情 register_shutdown_function()
- Opencv3.0.0在Ubuntu12.04下的编译和安装和测试
- 解析XML文档
- HDU 2609 How many (最小表示法)
- #define SECONDS_PER_YEAR (60 * 60 * 24 * 365)UL gcc编译不能通过
- 杭电5138
- hibernate中session的三种状态
- UML概述
- JDBC基础学习笔记_05_jdbc的程序优化_Dao
- wordspace is use or cannot be created,choose a dfifferent one
- Leap Motion 用EmguCV 显示图像并对齐手指
- shell 升级版 实践出真知
- Application,Session和Cookies的区别
- Android 退出应用程序,所有活动,活动的管理