31403. A + B - C
🚧 이 문서는 현재 작업 중입니다! 🚧
이 문서는 현재 작업 중이며, 빠른 시일 내에 업데이트될 예정입니다.
문제 풀이
js
const testcases = [
{
input: `3
4
5
`,
output: `2
29
`,
},
];
function solution(input) {
const [A, B, C] = input.trim().split('\n');
const number = Number(A) + Number(B) - Number(C);
const string = Number(A + B) - Number(C);
return [number, string].join('\n');
}
export default { testcases, solution };
js
const testcases = [
{
input: `3
4
5
`,
output: `2
29
`,
},
];
function solution(input) {
const [A, B, C] = input.trim().split('\n');
const number = Number(A) + Number(B) - Number(C);
const string = Number(A + B) - Number(C);
return [number, string].join('\n');
}
module.exports = { testcases, solution };
ts
import type { Testcases, Input, Output } from 'bananass';
const testcases = [
{
input: `3
4
5
`,
output: `2
29
`,
},
] satisfies Testcases;
function solution(input: Input): Output {
const [A, B, C] = input.trim().split('\n');
const number = Number(A) + Number(B) - Number(C);
const string = Number(A + B) - Number(C);
return [number, string].join('\n');
}
export default { testcases, solution };
ts
import type { Testcases, Input, Output } from 'bananass';
const testcases = [
{
input: `3
4
5
`,
output: `2
29
`,
},
] satisfies Testcases;
function solution(input: Input): Output {
const [A, B, C] = input.trim().split('\n');
const number = Number(A) + Number(B) - Number(C);
const string = Number(A + B) - Number(C);
return [number, string].join('\n');
}
module.exports = { testcases, solution };