摘要:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=208 自己看题吧,把'替换为’#include <stdio.h>#include <string.h>#define N = 1000;int main(){int i,j,cnt=0; char src[N],dst[N]; while(gets(src)){for(i=j=0;i<strlen(src);i++){ if(src[i]!= 阅读全文
摘要:
地址:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=36 如果你是奇数,n=3n+1;偶数,n=n/2; 硬推;#include<stdio.h>int arr[100001];int main(){ int a,b;int i; arr[1]=1; arr[2]=2; for(i=3;i<10001;i++) { long long temp=i; int cnt=0; while(temp!=1) { if 阅读全文