输入一个正整数数组,输出由数组里面所有数字组成的最大正整数; 如 {4, 2, 3} 得 432 。
示例1
输入
[6,4,5,1]
输出
6541
加载中...
import java.util.*; public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arrs int整型一维数组 正整数数组 * @return int整型 */ public int maxIntValue (int[] arrs) { // write code here } }
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arrs int整型vector 正整数数组 * @return int整型 */ int maxIntValue(vector
& arrs) { // write code here } };
#coding:utf-8 # # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param arrs int整型一维数组 正整数数组 # @return int整型 # class Solution: def maxIntValue(self , arrs ): # write code here
using System; using System.Collections.Generic; class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arrs int整型一维数组 正整数数组 * @return int整型 */ public int maxIntValue (List
arrs) { // write code here } }
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arrs int整型一维数组 正整数数组 * @return int整型 */ function maxIntValue( arrs ) { // write code here } module.exports = { maxIntValue : maxIntValue };
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param arrs int整型一维数组 正整数数组 # @return int整型 # class Solution: def maxIntValue(self , arrs ): # write code here
package main import "fmt" /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arrs int整型一维数组 正整数数组 * @return int整型 */ func maxIntValue( arrs []int ) int { // write code here }
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arrs int整型一维数组 正整数数组 * @param arrsLen int arrs数组长度 * @return int整型 */ int maxIntValue(int* arrs, int arrsLen ) { // write code here }
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param arrs int整型一维数组 正整数数组 # @return int整型 # class Solution def maxIntValue(arrs) # write code here end end
object Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arrs int整型一维数组 正整数数组 * @return int整型 */ def maxIntValue(arrs: Array[Int]): Int = { // write code here } }
object Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arrs int整型一维数组 正整数数组 * @return int整型 */ fun maxIntValue(arrs: IntArray): Int { // write code here } }
import java.util.*; public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arrs int整型一维数组 正整数数组 * @return int整型 */ public int maxIntValue (int[] arrs) { // write code here } }
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arrs int整型一维数组 正整数数组 * @return int整型 */ export function maxIntValue(arrs: number[]): number { // write code here }
public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arrs int整型一维数组 正整数数组 * @return int整型 */ func maxIntValue ( _ arrs: [Int]) -> Int { // write code here } }
struct Solution{ } impl Solution { fn new() -> Self { Solution{} } /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param arrs int整型一维数组 正整数数组 * @return int整型 */ pub fn maxIntValue(&self, arrs: Vec
) -> i32 { // write code here } }
[6,4,5,1]
6541