8 lines
292 B
TypeScript
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); |