“Python to Java Converter” Ответ

Python to Java Converter

def shiftLeft(source,k):
    i=0
    while(i<=(len(source)-k-1)):
        source[i]=source[i+k]
        i=i+1
    i=len(source)-1
    while(i>=len(source)-k):
        source[i]=0
        i=i-1
    print(source)
source=[10,20,30,40,50,60]
shiftLeft(source,3)
Yucky Yak

Python to Java Converter

input1=input("Enter a 4-digit number: ")

input2 =input("Enter a 4-digit number: ")

input3 =input("Enter a 4-digit number: ")

print()

ul = list()

tl = list()

hl=list()

thl=list()

ul.append(input1[-1])

tl.append(input1[-2])

hl.append(input1[-3])

thl.append(input1[-4]) ul.append(input2[-1])

tl.append(input2[-2])

hl.append(input2[-3])

thl.append(input2[-4])

ul.append(input3[-1]) tl.append(input3[-2])

hl.append(input3[-3])

thl.append(input3[-4])

um = max(ul)

tm = max(tl)

hm = max(hl)

thm = max(thl)

print(thm + hm + tm + um)
Manoj R

Python to Java Converter

print('jjj');
Inexpensive Ibex

Python to Java Converter

array=list(map(int,input().split(",")))
array=sorted(array)
j=[]
j.append(array[0])
j.append(array[1])
for i in range(2,len(array)):
    if j[i-1]+j[i-2] in array:
        j.append(j[i-1]+j[i-2])
    else:
        break
print(j)
Tame Toad

Python to Java Converter

import math
st = input()
sumi = 0
che = 0
for i in st:
    sumi+=ord(i)
for j in str(sumi):
    # print(j)
    che+=pow(int(j),len(str(sumi)))
res = []
flag = False
if che==sumi:
    res = list(dict.fromkeys(st))
    flag = True
if flag:
    for i in res:
        print(i,end="")
else:
    print(-1)
Stormy Snail

Python to Java Converter

def getUmbrellas(requirement, sizes):
    for i in sizes:
        if i > requirement:
            pass
        else:
            q = requirement / i
            r = requirement % i
            if r == 0:
                return q
            if r in sizes:
                return q + 1
        return -1
Brave Barracuda

Python to Java Converter

sorted(iterable, key=None, reverse=False)
Quaint Quagga

Python to Java Converter

a-int(input())

1=list (map(int,input().split()))

1. sort()

b-max(1)

c=min (1)

print (b-c)
Precious Pelican

Python to Java Converter

import math



print('Penentuan akar bilangan')

bilangan = int(input('Bilangan='))



a=1

b=bilangan

EPSILON = 1e-10

while b-a > EPSILON:

    x = (a+b)/2

    if x*x > bilangan:

        b=x

    else:

        a=x

        

akar = a



print('Akar', bilangan,'=', akar)

print('Hasil math.sqrt()=', math.sqrt(bilangan))
Famous Finch

Python to Java Converter

self.assert_element_not_visible("div#drop2 img#logo")
        self.drag_and_drop("img#logo", "div#drop2")
        self.assert_element("div#drop2 img#logo")
Frightened Finch

Ответы похожие на “Python to Java Converter”

Вопросы похожие на “Python to Java Converter”

Больше похожих ответов на “Python to Java Converter” по Java

Смотреть популярные ответы по языку

Смотреть другие языки программирования