学习时间:
2023年3月11日
题目描述:
题解分享:
// 作 者 : 繁 华 倾 夏
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
// 力扣(LeetCode):389. 找不同
char findTheDifference(char* s, char* t) {// 求和
int n = strlen(s), m = strlen(t);
int as = 0, at = 0;
for (int i = 0; i < n; i++) {
as += s[i];
}
for (int i = 0; i < m; i++) {
at += t[i];
}
return at - as;
}