2020年2月3日

LCP 1. 猜数字

摘要: int game(int* guess, int guessSize, int* answer, int answerSize){ if (guess == NULL || answer == NULL) return 0; int res = 0; for (int i = 0; i < gues 阅读全文

posted @ 2020-02-03 11:24 luckygxf 阅读(138) 评论(0) 推荐(0) 编辑

1281. 整数的各位积和之差

摘要: int subtractProductAndSum(int n){ int sum = 0; int plus = 1; while (n > 0) { int mod = n % 10; sum += mod; plus *= mod; n = n / 10; } return plus - su 阅读全文

posted @ 2020-02-03 11:23 luckygxf 阅读(105) 评论(0) 推荐(0) 编辑

1313. 解压缩编码列表 - c

摘要: /** * Note: The returned array must be malloced, assume caller calls free(). */ int* decompressRLElist(int* nums, int numsSize, int* returnSize){ if ( 阅读全文

posted @ 2020-02-03 00:55 luckygxf 阅读(193) 评论(0) 推荐(0) 编辑

导航