Skip to content

Commit e428f25

Browse files
committed
form a largest value from the given array
1 parent b0927b8 commit e428f25

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

basic.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,35 @@
368368
# val=int(input('enter the number:'))
369369
# print(prime(val))
370370

371-
371+
# form a largest value from the given array
372+
# def get_list():
373+
# new_list = []
374+
# for items in input("Enter elements are separated by spaces: ").split():
375+
# if items.isdigit():
376+
# N=int(items)
377+
# if N>=1 and N<=1000:
378+
# new_list.append(N)
379+
# else:
380+
# print("Invalid input. Please enter a number between 1 and 1000000.")
381+
# return []
382+
# else:
383+
# print("Invalid input. Please enter a list of space-separated integers.")
384+
# return []
385+
# return new_list
386+
#
387+
# def order(arr):
388+
# results = ""
389+
# length_arr = len(arr)-1
390+
# while length_arr>=0:
391+
# results+=str(arr[length_arr])
392+
# length_arr-=1
393+
# numb=int(results)
394+
# if numb>=1 and numb<=1000000:
395+
# return numb
396+
# else:
397+
# return "Invalid input"
398+
#
399+
# arr = get_list()
400+
# print(order(arr))
372401

373402

0 commit comments

Comments
 (0)