摘要: 最近在做一个个人主页博客网站的项目,遇到了这个问题。 当浏览器该页面提示错误“Uncaught SyntaxError: Unexpected token <”时,浏览器通常情况下不能够准确地标记该错误发生的位置,浏览器通常会将其标记在页面的顶行代码,即<html>标签附近,故无法直接找出错误的原因 阅读全文
posted @ 2017-08-21 11:40 AndrewLiang 阅读(5480) 评论(0) 推荐(0) 编辑
摘要: /* * Title : A+B(III) * Data : 2016/11/09 * Author : Andrew */ #include #include int main() { std::string str1, str2; while (std::cin >> str1 >> str2) { int a[100], b[100],... 阅读全文
posted @ 2016-11-09 21:24 AndrewLiang 阅读(299) 评论(0) 推荐(0) 编辑
摘要: /* * Title : A+B(II) * Data : 2016/11/09 * Author : Andrew */ #include #include int main() { double a, b; while (std::cin >> a >> b) { std::cout << std::setiosflags(std::io... 阅读全文
posted @ 2016-11-09 19:29 AndrewLiang 阅读(182) 评论(0) 推荐(0) 编辑
摘要: /* * Title : A+B(I) * Data : 2016/11/09 * Author : Andrew */ #include int main() { int a, b; while (std::cin >> a >> b) { std::cout << a + b << std::endl; } return 0... 阅读全文
posted @ 2016-11-09 19:24 AndrewLiang 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 谈到斐波那契数列,可能是算法中经典的算法之一了。让我们先来看看斐波那契数列的由来: Fibonacci’s original question: 1.Suppose that you are given a newly-born pair of rabbits, one male, one fema 阅读全文
posted @ 2016-09-22 19:35 AndrewLiang 阅读(6126) 评论(0) 推荐(0) 编辑
摘要: 给定两个整数,求出这两个整数的最大公约数是我们从小就接触过的问题,但是我们如何用更简洁的算法来计算呢? 本文中,假定这两个整数是m和n且m>=n>=0。让我们从最简单的算法说起! 一、Consecutive Integer Test——连续整数检测算法 由最大公约数的概念,我们可以知道,能够同时被两 阅读全文
posted @ 2016-09-20 20:04 AndrewLiang 阅读(19930) 评论(0) 推荐(1) 编辑