I have once deleted the duplicated memos but it keeps getting duplicated. So far I have more than 27000 duplicated memos on my Samsung S6. Do you know how to prevent this from happening?
Unfortunately that's a bug with the Samsung Cloud account. Short of deleting the Notes content from your cloud back up, restoring only the non-duplicated notes to your phone, and then resigning in to the account to back up, there's not much you can do but to live with the duplicates. (If you're still using S-Notes, especially)