function NumberOf1(n)
{
// write code here
}
package main
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
* @param n int整型
* @return int整型
*/
func NumberOf1( n int ) int {
// write code here
}
#
# 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
#
# @param n int整型
# @return int整型
#
class Solution
def NumberOf1(n)
# write code here
end
end
object Solution {
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
* @param n int整型
* @return int整型
*/
def NumberOf1(n: Int): Int = {
// write code here
}
}
object Solution {
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
* @param n int整型
* @return int整型
*/
fun NumberOf1(n: Int): Int {
// write code here
}
}
import java.util.*;
public class Solution {
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
* @param n int整型
* @return int整型
*/
public int NumberOf1 (int n) {
// write code here
}
}
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
* @param n int整型
* @return int整型
*/
export function NumberOf1(n: number): number {
// write code here
}
public class Solution {
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
* @param n int整型
* @return int整型
*/
func NumberOf1 ( _ n: Int) -> Int {
// write code here
}
}
struct Solution{
}
impl Solution {
fn new() -> Self {
Solution{}
}
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
* @param n int整型
* @return int整型
*/
pub fn NumberOf1(&self, n: i32) -> i32 {
// write code here
}
}
10
2