题解 | 进制A+B
进制A+B
https://www.nowcoder.com/practice/6187581174ac48278ca3bccf8d534897
#include <stdio.h>
int main() {
int a,b,c;
scanf("%X %o",&a,&b);
c = a + b;
printf("%d",c);
return 0;
}
进制A+B
https://www.nowcoder.com/practice/6187581174ac48278ca3bccf8d534897
#include <stdio.h>
int main() {
int a,b,c;
scanf("%X %o",&a,&b);
c = a + b;
printf("%d",c);
return 0;
}
相关推荐
敢逐云霄志:你打招呼语怎么能这么长,hr都没看下去的欲望,简明扼要说重点,就读于某某学校某某专业,26届应届毕业生,学信网可查,先后在某某公司实习过(如有),然后做过什么项目,想找一份什么样的工作,可实习几个月以上,期待您的回复。
球球与墩墩:这不是前端常考的对象扁平化吗,面试官像是前端出来的
const flattern = (obj) => {
const res = {};
const dfs = (curr, path) => {
if(typeof curr === 'object' && curr !== null) {
const isArray = Array.isArray(curr);
for(let key in curr) {
const newPath = path ? isArray ? `${path}[${key}]` : `${path}.${key}` : key;
dfs(curr[key], newPath);
}
} else {
res[path] = curr
}
}
dfs(obj);
return res;
}
查看3道真题和解析