OJ
文章平均质量分 60
iPv6_bras
这个作者很懒,什么都没留下…
展开
-
HDU_OJ-The Seven Percent Solution
#include using namespace std; int main() { char ch; char str[85]; int i; for (i = 0; i < 85; i++) str[i] = '\0'; i = 0; while ((ch = cin.get()) != '#') { str[i] = ch;原创 2015-04-21 20:34:50 · 1273 阅读 · 0 评论 -
HDU_OJ-Balloon Comes!
#include #include using namespace std; int main() { int counter; char op; int a, b; cin >> counter; for (int i = 0; i < counter; i++) { cin >> op >> a >> b; if (op == '+')原创 2015-04-21 22:38:30 · 261 阅读 · 0 评论 -
leetcode_202_Happy Number
Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares o原创 2015-10-04 21:19:29 · 357 阅读 · 0 评论 -
leetcode_258_Add Digits
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one原创 2015-10-04 21:19:07 · 286 阅读 · 0 评论 -
leetcode_263_Ugly Number
Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly since i原创 2015-10-04 21:34:03 · 236 阅读 · 0 评论