This problem is to convert a string into a list , Call it sort method Just do it
s = "WHERETHEREISAWILLTHEREISAWAY" arr = [] for i in s: arr.append(i)
arr.sort() for i in arr: print(i, end="")

Second question , brute force , No solution ....

 

This question , Is to make the short side longer , Long side divided by 2 Just fine
import math s = input() num = int(s.split("A")[1]) A0 = [1189, 841] tmp =
A0.copy() for i in range(num): tmp = [tmp[1], math.floor(float(tmp[0]) / 2.0)]
print(tmp[0]) print(tmp[1])

The idea is to find the sum of all digits first , Then the current value , The sum of digits is also stored in a list , Traverse the list , Just compare them in turn , 
n = int(input()) m = int(input()) arr = [[1, 1]] def get_sum(num): m = 0 s =
10 while True: if num == 0: break m += num % s num = num // s return m for i in
range(2, n + 1): x = get_sum(i) flag = False tmp = arr.copy() for j, v in
enumerate(arr): if x < v[0]: tmp.insert(j, [x, i]) flag = True break elif x ==
v[0]: if i < v[1]: tmp.insert(j, [x, i]) flag = True break if not flag:
tmp.append([x, i]) arr = tmp.copy() print(arr[m - 1][1])

This question , Can not do ...

  This question , I think it's to find the edge characters first every time , The index of the edge character is then stored in a list , Then delete the edge characters according to this list , Then keep cycling , Until empty , Or until there is no change in one cycle
s = input() arr = [] for i in s: arr.append(i) tmp = set() i = pow(2, 64)
while True: for i in range(len(arr)): if i + 1 < len(arr) and i - 1 >= 0 and
arr[i - 1] == arr[i] and arr[i] != arr[i + 1]: tmp.add(i) tmp.add(i + 1) elif i
+ 1 < len(arr) and i - 1 >= 0 and arr[i] == arr[i + 1] and arr[i - 1] !=
arr[i]: tmp.add(i - 1) tmp.add(i) count = 0 if tmp == set(): break while tmp !=
set(): v = tmp.pop() arr.pop(v - count) count += 1 tmp.clear() if arr == []:
break if i == 0: break i = i - 1 if arr == []: print("EMPTY") else: for i in
arr: print(i, end="")
 

  I used a stupid way to solve this problem , First use itertools Inside method , Find out all the permutations , Then traverse the full permutation , Then solve , I'm not sure, right
import itertools n = int(input()) t = [i + 1 for i in range(n)] arr =
list(itertools.permutations(t)) count = 0 for i in arr: for j in range(1,
len(i)): for k in range(0, j): if i[k] < i[j]: count += 1 print(count %
998244353)

This question is not sure , My idea is to find the biggest upgrade every time .
string = input() arr = string.split(" ") N, M = int(arr[0]), int(arr[1]) alls
= [] for i in range(N): str1 = input().split(" ") tmp = [] for j in str1:
tmp.append(int(j)) alls.append(tmp) s = 0 while True: x = {"m": 0, "index": 0}
tmp = x["m"] for i in range(len(alls)): t = alls[i][0] if t > x["m"]: x["m"] =
alls[i][0] x["index"] = i if x["m"] < tmp: break s += x["m"]
alls[x["index"]][0] -= alls[x["index"]][1] M -= 1 if M == 0: break print(s)
 

This question , Can not do ....

 

This question , I won't do it .. Covered
str1 = input() nums = [int(i) for i in str1.split(" ")] n = nums[0] k =
nums[1] string = input() strs = string.split(" ") arr = [int(i) for i in strs]
count = 0 for i in range(len(arr)): if k > 0: while True: if arr[i] == 0: break
flag = True if k + i < len(arr) + 1: for j in range(i, k + i): if arr[j] < 0:
flag = False if flag and k + i < len(arr) + 1: for j in range(i, k + i): arr[j]
-= 1 count += 1 else: while True: arr[i] -= 1 count += 1 if arr[i] == 0: break
else: while True: if arr[i] == 0: break arr[i] -= 1 count += 1 print(count)
 

Technology
©2019-2020 Toolsou All rights reserved,
【C++ Must see for entry 】C++ from 0 reach 1 Introductory programming axios Interceptor packaging and use Spring Boot Interview must ask : Automatic configuration principle VMware 16 install centos 7 Detailed tutorial C Language data structure - Sequence table delete duplicates V2.0.0 The 12th Blue Bridge Cup c++b Group personal problem solving On sending data from serial port single chip microcomputer to upper computer centos7 install RabbitMqjava Polymorphic array of opencv-python Fourier transform and inverse transform