摘要: 知乎上看到的, 说是有这么一个数列:1 - 2 + 3 - 4 + 5 ...... 100让求最终的和。我觉得如果单说这个数列的话, 有点简单啊:int f (int n){ return n % 2 == 0 ? -( n / 2) : (n + ... 阅读全文
posted @ 2015-02-03 22:50 wu_overflow 阅读(219) 评论(0) 推荐(0)
摘要: #include #include using namespace std;bool IsDivides (const int &a, const int &b){ return (b % a == 0);}int FindDivisor (const int &n, int &&test_divi... 阅读全文
posted @ 2015-02-03 10:32 wu_overflow 阅读(157) 评论(0) 推荐(0)