![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm poj
willpower1li
技术宅
展开
-
poj_3094
//用getchar() 取得每一个字符 并逐个分析 #include "iostream" #include "string" using namespace std; int main() {char s; int sum=0;int num=1; while(1) { s=getchar(); if (s=='#') break;原创 2014-12-16 01:33:31 · 311 阅读 · 0 评论 -
poj_1207
//将各个部分划分出来 就行 #include "iostream" using namespace std; int req_n(int a) {int b=0; while(1) { if(a==1) { b++;break;} else if(a%2==1) { a=3*a+1;b++; }原创 2014-12-16 01:37:15 · 362 阅读 · 0 评论 -
POJ3980
//直接出一个k 使得k*num2>num1 然后num1-(k-1)num2 #include"iostream" using namespace std; int main() { int num1,num2; while(scanf("%d%d",&num1,&num2)!=EOF) { int k=0; while(num1>=n原创 2014-12-16 01:29:08 · 414 阅读 · 0 评论 -
poj_1204Word Puzzles
Description Word puzzles are usually simple and very entertaining for all ages. They are so entertaining that Pizza-Hut company started using table covers with word puzzles printed on them, possibly原创 2014-12-16 17:23:46 · 394 阅读 · 0 评论 -
poj_1012joseph
Description The Joseph's problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, . . ., n, standing in circle every mth is going to原创 2014-12-16 17:29:26 · 260 阅读 · 0 评论 -
poj_1258--Agri-Net
Description Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. Farmer John ord原创 2014-12-17 01:06:04 · 318 阅读 · 0 评论 -
poj_3062
//一个很简单的题目,gets()一个数组输出即可 #include #include using namespace std; int main() { char a[10]; while(gets(a)) puts(a); return 0; }原创 2014-12-16 23:56:25 · 380 阅读 · 0 评论