- 博客(4)
- 收藏
- 关注
原创 Codewars:Duplicate Encoder
要求: The goal of this exercise is to convert a string to a new string where each character in the new string is “(” if that character appears only once in the original string, or “)” if that character...
2019-09-09 18:56:54 446
原创 Codewars:Find The Parity Outlier(差距)
话不多说,给一个数组,找出偶数中的奇数或者奇数中的偶数 我的代码 #include <stdlib.h> int find_outlier(const int *values, size_t count) { int i=0,odd=0,even=0,cnt=0; for(i=0;i<3;i++) { if(values[i]%2==0)...
2019-09-07 18:07:17 232
原创 Codewars:Balanced Numbers
题目描述: 给出一个数,当他的左边各个位上的数字加起来与右边各个位上的 数字加起来相等时,即为Balanced Number; example1:23450 example2:234 example3:157824 Balanced ; Not Balanced ; Balanced #include<stdio.h> int main(void) { int number; s...
2019-09-07 12:20:47 139
原创 hihoCoder:problem1000(C语言)
#1000 : A + B 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述求两个整数A+B的和输入输入包含多组数据。 每组数据包含两个整数A(1 ≤ A ≤ 100)和B(1 ≤ B ≤ 100)。输出对于每组数据输出A+B的和。 实现思路:每次输入一组整数,直接相加输出,循环一直到没有输入为止。判断输出结束也可以根据输入是否是EOF 接下来是具体代码 #incl...
2019-08-26 15:05:15 136
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人