摘要: 思路:遍历判断每个数的正负 class Solution { public: int arraySign(vector<int>& nums) { int ans = 1; for(auto &n : nums){ if(n == 0) return 0; ans *= (n > 0) ? 1 : 阅读全文
posted @ 2021-04-13 00:16 Whisperbb 阅读(61) 评论(0) 推荐(0) 编辑