随笔分类 - POJ
摘要:http://poj.org/problem?id=1017 //POJ_1017 //参考https://www.cnblogs.com/MashiroSky/p/5928053.html #include<stdio.h> int max(int a,int b){ if(a>b){ retur
阅读全文
摘要:http://poj.org/problem?id=1007 题目要求按倒序数升序排列字符串,有一点要注意,输出时候要控制字符数,否则会OLE #include<stdio.h> char c[100][50]; int Step(char*a,int length){ int step = 0;
阅读全文
摘要:http://poj.org/problem?id=1006 根据题意很自然地写出了暴破解法如下: //POJ_1006 #include<stdio.h> int main(){ int n,i,j,k; int p,q,r,d; n = 0; while(true){ scanf("%d %d
阅读全文
摘要:http://poj.org/problem?id=1002 此题大意为输入一系列电话号,输出重复出现的电话号 输入:可以输入大写字母(除了Q和Z),数字或者横线(-) 字母按拼音九键的对应规则,横线为无意义输入 算法:先把输入整理为七位数字,存进b[N] 将b[N]用sort(b,b+n)排序 输
阅读全文
摘要:http://poj.org/problem?id=1003 题目要求从1/2+1/3+......+1/(n+1)大于给定的一个浮点数,输出n #include<stdio.h> int main(){ int i; double sum,c; while(true){ scanf("%lf",&
阅读全文
摘要:http://poj.org/problem?id=1000 题目要求输入两个整数,输出和 #include<stdio.h> int main(){ int a,b; scanf("%d %d",&a,&b); printf("%d\n",a+b); return 0; } 扩展:输入两个大整数,
阅读全文
摘要:http://poj.org/problem?id=1001 大体思路为将底数转换为十进制整数,求幂,然后再转换回小数 Multiply()负责结果乘乘数 输出需要判断小数位数与尾数位数的关系 代码参考了https://www.cnblogs.com/jhldreams/p/3785315.html
阅读全文