www.bersaty.com
摘要: 水~~找规律#include<iostream>using namespace std;int cow(int n){ if(n>4) return cow(n-1)+cow(n-3); else return n;}int main (){ int n; while(cin>>n&&n) printf("%d\n",cow(n)); return 0;} 阅读全文
posted @ 2011-06-27 21:51 bersaty 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 2000~2007//2000 http://acm.hdu.edu.cn/showproblem.php?pid=2000#include<stdio.h>#include<string.h>void main(){ char str[4],t; int i; while(scanf("%s",str)!=EOF) { for(i=0;i<2;i=i++) { if(str[i]>str[i+1]) { t=str[i]; str[i]=str[i+1]; str[i+1]=t; } } for(i=0;i<2;i=i++) { 阅读全文
posted @ 2011-06-27 20:43 bersaty 阅读(259) 评论(0) 推荐(0) 编辑