DCP-513: Charming Numbers

Why Time Limit is now 2s.
it was 2.5 / 4 s.
another thing is when i am trying to use bitset it takes much time.

Update:
my solution: https://pastebin.ubuntu.com/p/jzBSNQ8W5k/
verdict : TLE
memory: 184MB (according to CF)
how should i improve my code




it was 2.5 / 4 s.
another thing is when i am trying to use bitset it takes much time.



Update:
my solution: https://pastebin.ubuntu.com/p/jzBSNQ8W5k/
verdict : TLE
memory: 184MB (according to CF)
how should i improve my code



