题目

题意:求输入的数字的递归回文。

思路:答案等于这个数字一半之前的所有的 之和。

 #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std; int main()
{
int ca, t, i, j, x;
int f[];
f[] = ; f[] = ;
for(i = ; i <= ; i++)
{
f[i] = ;
for(j = ; j <= i/; j++)
f[i] += f[j];
} cin>>t;
for(ca = ; ca <= t; ca++)
{
cin>>x;
printf("%d %d\n", ca, f[x]);
}
return ;
}

最新文章

  1. WIN7下VS2008生成Detours3.0
  2. mac 10.9 安装 gevent
  3. Objective C 快速入门学习五
  4. C++类的成员函数使用的一些小总结
  5. [设计模式] 7 桥接模式 bridge
  6. python 利用pop3接收邮件并保存附件
  7. NUnit使用详解(一)
  8. 为 Devops 和系统管理员提供的 400+ 免费资源
  9. Android:View颤抖的动画效果代码
  10. PHP数组基本排序算法和查找算法
  11. 剑指Offer——算法复杂度中的O(logN)底数是多少
  12. Msys+MinGW编译VLC
  13. 使用伪类before和after
  14. html 表单input录入内容校验
  15. svn命令使用;
  16. 单点登录SSO的原理及实现方式总结
  17. mysqldump: Couldn&#39;t execute &#39;SHOW VARIABLES LIKE &#39;ndbinfo_version&#39;&#39;: Native table &#39;performance_schema&#39;.&#39;session_variables&#39; has the wrong structure (1682)
  18. 【C#】Using的一个比较好的语言文字解释
  19. python监控端口脚本[jkport2.0.py]
  20. Javaworkers团队最终项目总结

热门文章

  1. 路由器开发板上的TTL线连接方法
  2. oracle里如何将两个日期的时间差返回**时**分的格式
  3. 搭建Asp.Net MVC4
  4. ubuntu 12.04 搭建nginx + php + mysql +phpmyadmin
  5. 2006: [NOI2010]超级钢琴 - BZOJ
  6. MemSQL Start[c]UP 2.0 - Round 2 - Online Round
  7. error C2061: syntax error : identifier &#39;__RPC__out_xcount_part&#39;
  8. 【转】System.DateTime.Now.ToString()的一些用法
  9. Codeforces Round #256 (Div. 2) Multiplication Table
  10. Eclipse改变外观,护眼模式