code
文章平均质量分 67
青草封尘
人在风中走成山脉
展开
-
Codewars:Balanced Numbers
题目描述:给出一个数,当他的左边各个位上的数字加起来与右边各个位上的 数字加起来相等时,即为Balanced Number;example1:23450example2:234example3:157824Balanced ; Not Balanced ; Balanced#include<stdio.h>int main(void){ int number; s...原创 2019-09-07 12:20:47 · 140 阅读 · 0 评论 -
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 阅读 · 0 评论 -
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 · 234 阅读 · 0 评论 -
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 · 448 阅读 · 0 评论