C语言 | Leetcode C语言题解之第393题UFT-8编码验证
题目: 题解: static const int MASK1 1 << 7; static const int MASK2 (1 << 7) (1 << 6);bool isValid(int num) {return (num & MASK2) MASK1; }int getBytes(int num) {if ((num & MASK1) 0) {return 1;}int n 0;in…
2024-10-24