2025-09-13 20:47:03 +09:00

8 lines
292 B
TypeScript

export {};
const input: string[] = require("fs").readFileSync(0, "utf8").toString().trim().split('\n');
let depth: number = 0;
for(let line of input) {
const [method, num]: string[] = line.split(' ');
depth += (method === 'Es' ? Number(num)*21 : Number(num)*17);
}
console.log(depth);