14 lines
327 B
TypeScript
14 lines
327 B
TypeScript
import { readFileSync } from 'fs';
|
|
import { join } from 'path';
|
|
|
|
const fileString = readFileSync(join(__dirname, "input"), 'utf-8');
|
|
|
|
for (var i = 0; i < fileString.length; i++) {
|
|
const win = fileString.slice(i, i + 14);
|
|
const swin = new Set<string>(win);
|
|
if (swin.size == 14) {
|
|
console.log(i + 14);
|
|
break;
|
|
}
|
|
}
|