Rating:

TL;DR:
Subtract each character of the final value with each character of flag.

Original writeup (https://nischay.me/2020/04/28/Houseplant.html).