题解 | 23年OPPO-a的翻转
const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;
void async function () {
// Write your code here
while(line = await readline()){
let tokens = line.split(' ');
let a = parseInt(tokens[0]);
let b = parseInt(tokens[1]);
b = parseInt(String(a).split('').reverse().join(''));
// 这里先将a转换为字符串-->分割转化为数组,转换完毕后,进行反转,再转换为字符串-->整数
console.log(a + b);
}
}()

查看11道真题和解析