题解 | #联谊活动#
联谊活动
https://www.nowcoder.com/practice/ae8ba287c81d4a2a9412467322464bf2
直接写就是,没啥难度,
package main
//import "fmt"
/**
 * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
 *
 * 
 * @param x int整型 参加活动人数
 * @return bool布尔型
*/
func odevity( x int ) bool {
    // write code here
    var ans int
    ans = x % 2
    if(ans == 1){
        return false
    }else{
        return true
    }
}


 查看14道真题和解析
查看14道真题和解析