NEU 1009 Happiness Hotel
1009: Happiness Hotel
时间限制: 1 Sec 内存限制: 128 MB
提交: 173 解决: 19
[提交][状态][讨论版]
题目描述
The life of Little A is good, and, he managed to get enough money to run a hotel. The best for him is that he need not go to work outside, just wait for the money to go into his pocket. Little A wants everything to be perfect, he has a wonderful plan that he will keep one most beautiful reception whose size is 1()(which means the reception is 1 square meter). There are other k rooms that have the same area, and the area is x^2(), x is an integer; Little A wants his hotel to be a square. Little A is a good thinker, but not a good maker. As his poor performance on math, he cannot calculate the least area needed to build such a hotel of his will. Now, this task belongs to you, solve this problem to make Little A’s dream of Happy Hotel come true. Please be careful, the whole area should only contain k rooms, and the reception, there should not be any vacant place.
输入
There are several test cases.
Each case contains only one integer k(1<=k<=1000) ,the number of rooms the hotel should have in one line.
Proceed to the end of file.
输出
Output one integer d, means the hotel’s area is d^2(If there is no answer, output “no solution”) .The output of one test case occupied exactly one line.
样例输入
1
2
3
样例输出
no solution
3
2
提示
来源
NEU 1009 Happiness Hotel的更多相关文章
- NBUT 1224 Happiness Hotel 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB The life of Little A is good, and, he managed to get enoug ...
- [NBUT 1224 Happiness Hotel 佩尔方程最小正整数解]连分数法解Pell方程
题意:求方程x2-Dy2=1的最小正整数解 思路:用连分数法解佩尔方程,关键是找出√d的连分数表示的循环节.具体过程参见:http://m.blog.csdn.net/blog/wh2124335/8 ...
- BZOJ 2127: happiness [最小割]
2127: happiness Time Limit: 51 Sec Memory Limit: 259 MBSubmit: 1815 Solved: 878[Submit][Status][Di ...
- HDOJ 1009. Fat Mouse' Trade 贪心 结构体排序
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- 1009: [HNOI2008]GT考试
1009: [HNOI2008]GT考试 Time Limit: 1 Sec Memory Limit: 162 MB Description 阿申准备报名参加GT考试,准考证号为N位数\(X_1X_ ...
- POJ 3667 Hotel(线段树 区间合并)
Hotel 转载自:http://www.cnblogs.com/scau20110726/archive/2013/05/07/3065418.html [题目链接]Hotel [题目类型]线段树 ...
- ACM: Hotel 解题报告 - 线段树-区间合并
Hotel Time Limit:3000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Description The ...
- HDU - Hotel
Description The cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and e ...
- 【POJ3667】Hotel
Description The cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and e ...
随机推荐
- C#怎么清除字符串中HTML标签。。。
因为用到了一款编辑器的原因,使得数据库中保存的数据会夹杂着一些HTML标签,之后导出的数据中就会出现一些不同的HTML的标签.严重影响用户的视觉体验(主要自己都看不下去了)... 下面是我将DataT ...
- 如何解决Android 5.0以上出现的警告:Service Intent must be expli
有些时候我们使用Service的时需要采用隐私启动的方式,但是Android 5.0一出来后,其中有个特性就是Service Intent must be explitict,也就是说从Lollip ...
- Dependency Injection in ASP.NET MVC
原文引自http://www.dotnetcurry.com/ShowArticle.aspx?ID=786 1.传统三层结构,相邻两层之间交互: 2.如果使用EntityFramework则View ...
- NagiosQL安装
NagiosQL和Nconf是比较好用的Nagios配置工具. 一.安装NagiosQL 1.在服务器终端运行以下命令: ##YUM安装PHP模块yum -y install --disabl ...
- 【技术累积】【点】【java】【2】聊一聊似曾相识的switch语句
闲聊 有些东西并不能像爱因斯坦老先生说的那样,书上查的到就不用去记住... 开始 java使用了C的所有流程控制语句: java中同样有switch语句: 大多数情况下,switch都可以用if替换: ...
- Git 常用命令速查(转载)
git branch 查看本地所有分支git status 查看当前状态 git commit 提交 git branch -a 查看所有的分支git branch -r 查看远程所有分支git co ...
- PHP SPL 文件处理(SplFileInfo和SplFileObject)
SplFileInfo用来获取文件详细信息.SplFileObject遍历.查找指定行.写入csv文件等内容 SplFileInfo用来获取文件详细信息: $file = new SplFileInf ...
- Vue JsonView 树形格式化代码插件
组件代码(临时粘出来) <template> <div class="bgView"> <div :class="['json-view' ...
- [SCOI2016]萌萌哒(倍增+并查集)
当区间\([a,b]\)和\([c,d]\)对应相等时. 我们把两个区间对应位置上的数所在并查集合并. 最后并查集的数量为\(num\)答案就是\(9*10^num\)因为是个数,不能有前置\(0\) ...
- yii2-dingtalk 钉钉群机器人
说明 群机器人是钉钉群的高级扩展功能.群机器人可以将第三方服务的信息聚合到群聊中,实现自动化的信息同步.目前,大部分机器人在添加后,还需要进行Webhook配置,才可正常使用(配置说明详见操作流程中的 ...