“Convertir Python en Java en ligne” Réponses codées

Convertir Python en Java en ligne

n = int(input())
d = int(input())
a = []
for _ in range(n):
    a.append(int(input()))
k = a[0] // d + 1
for i in range(1, len(a)):
    if i + 1 <= k:
        t = a[i] // d + i + 1
        if k < t:
            k = t
    else:
        break
if k > len(a):
    k = len(a)
print(k)
Perfect Pigeon

Convertir Python en Java en ligne

n = int(input())
d = int(input())
a = []
for _ in range(n):
    a.append(int(input()))
k = a[0] // d + 1
for i in range(1, len(a)):
    if i + 1 <= k:
        t = a[i] // d + i + 1
        if k < t:
            k = t
    else:
        break
if k > len(a):
    k = len(a)
print(k)
Perfect Pigeon

Convertir Python en Java en ligne

def rendreMonaie(C, Sum):
R=[]
while Sum!=0:
   i=0
   while C[i] > Sum:
      i=i+1
      R.append(C[i])
      Sum -= C[i]
   return R
Unsightly Unicorn

Convertir Python en Java en ligne

import check50
import check50_java

@check50.check()
def book_exists():
    """Book.java exists."""
    check50.exists("Book.java")

@check50.check(book_exists)
def book_compiles():
    """Book.java compiles."""
    check50_java.compile("Book.java")

@check50.check()
def press_exists():
    """Press.java exists."""
    check50.exists("Press.java")

@check50.check(press_exists)
def press_compiles():
    """Press.java compiles."""
    check50_java.compile("Press.java")

@check50.check()
def vm_exists():
    """VendingMachine.java exists."""
    check50.exists("VendingMachine.java")

@check50.check(vm_exists)
def vm_compiles():
    """VendingMachine.java compiles."""
    check50_java.compile("VendingMachine.java")
Lucky Locust

Convertir Python en Java en ligne

n = int(input())
d = int(input())
a = []
for _ in range(n):
    a.append(int(input()))
k = a[0] // d + 1
for i in range(1, len(a)):
    if i + 1 <= k:
        t = a[i] // d + i + 1
        if k < t:
            k = t
    else:
        break
if k > len(a):
    k = len(a)
print(k)
Perfect Pigeon

Convertir Python en Java en ligne




from math import sqrt

n = int(input())

l = []

for i in range(n):

l.append(list (map(int, input().split(' ')))))





res = sqrt( (l[1][0]-l[0][0]) * (l[1] [0]-l[0][0])+ (l[1][1]-l[0][1]) * (l[1][1])-l[0][1])

8 print(int (res))
Sagar Ganesh

Convertir Python en Java en ligne

n = int(input())
d = int(input())
a = []
for _ in range(n):
    a.append(int(input()))
k = a[0] // d + 1
for i in range(1, len(a)):
    if i + 1 <= k:
        t = a[i] // d + i + 1
        if k < t:
            k = t
    else:
        break
if k > len(a):
    k = len(a)
print(k)
Perfect Pigeon

Convertir Python en Java en ligne

word = input("Introduce una palabra: ")
for i in range(10):
    print(word)
Pablo Manuel Camargo Argaez

Réponses similaires à “Convertir Python en Java en ligne”

Questions similaires à “Convertir Python en Java en ligne”

Plus de réponses similaires à “Convertir Python en Java en ligne” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code