Skip to content

Instantly share code, notes, and snippets.

@fkvivid
Created May 1, 2026 19:47
Show Gist options
  • Select an option

  • Save fkvivid/541261dd0d963c3e850bcac0db7d3cb8 to your computer and use it in GitHub Desktop.

Select an option

Save fkvivid/541261dd0d963c3e850bcac0db7d3cb8 to your computer and use it in GitHub Desktop.
Solution of polkadot score
, ,-',
,', ,' ',' ,' ÅÑGË£ÏÇÄ †(–)Ë ßRĆ
'-', ' ,'
' -, ',
' -, ', , - - -,
('''''' ®'''''''') ,,,,, ,-' -,''''''''',
` ~„''`„~ ' ', ,', -' , -,'' ''''''''',
"„ " - „ „ - ",®,-' `~~' '''''''
„" " „ „ - " ,',,,',
„-" " " " " " " ~~~~~~" - „ ,'
„" –,'' ~ , • ; • " "„
""""; ' - , , ; , , , - '' ' ' -,_ ', ',
, -' ' ', ,' ,' ',~', ',
,' ' - , ,()' /\ ', (),'¯ ,' `¸`;
', ` ` ` ` ` ` ,-,,,-'
'-, ,¬ ,-'
' -, ~ ~~~~~~' ' ` ,-'
`~-,,,,,,, ,,,,,,,,,,-~'
('('('(,,, ; ; •Å(V)åö•
'-, '-,''' ,-';`,`'ˆˆˆˆˆ ,' ;' ' -, •97•
;¯ ; ; ; ', ; ; ,' ; ‚¸ ' -, •••
; ; ; ''''''''''' ``'-,', ,'
; ;, -¬; O O O O '-',,,,,,,,,,,,
; ; O O O O O ,' O ,'
' - - ' `; O O O O O ,'
,-' O O O O O O ,'
,-' O O O O O O ,'
,-' O O O O O O ,'
,-' O O O O O O O O O,-'-,
``¬ -,,,,,,,-¬~,~~~~~~~~~--',) (' -,
', (', ' -, '-,
',) (', `-,) ' -,
', ', `-, ,',-----,
',) ; `\,- ---'
¸,,,,'‡ (;
(¸,,,,,';_'\ ßy §(V)òó†(–)775 ™
import { readFileSync } from "fs";
function computePolkadotScore(string) {
const angelica = string.split("\n");
const lips = " ' -, ~ ~~~~~~' ' ` ,-'";
let lipsStartIndex = 0;
let lipsEndIndex = 0;
for (let i = 0; i < lips.length; i++) {
if (lips.slice(i, i + 6) === "~~~~~~") {
lipsStartIndex = i;
lipsEndIndex = i + 5;
break;
}
}
let polkaotsOutsideLips = 0;
let polkaotsInsideLips = 0;
let totalPupils = 0;
for (let i = 0; i < angelica.length; i++) {
for (let j = 0; j < angelica[i].length; j++) {
if (angelica[i][j] === "•") {
totalPupils++;
}
if ((angelica[i][j] === "•") && (j >= lipsStartIndex && j <= lipsEndIndex)) {
polkaotsInsideLips++;
} else if ((angelica[i][j] === "•") && (j < lipsStartIndex || j > lipsEndIndex)) {
polkaotsOutsideLips++;
}
}
}
return polkaotsOutsideLips + (polkaotsInsideLips * totalPupils);
}
const string = readFileSync("Angelica.txt", "utf8");
console.log(computePolkadotScore(string));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment