Submit solution
Points:
100.00 (partial)
Time limit:
1.0s
Memory limit:
512M
Input:
stdin
Output:
stdout
Problem type
Allowed languages
Python, Scratch
In case the statement didn't load correctly, you can download the statement here: Statement
Comments
from itertools import combinations, product
def is_valid(s): return s[0] != '0' and int(s[-2:]) % 4 == 0
def smallestdivisibleby4(N): Nstr = str(N) length = len(Nstr) minnum = None
N = int(input()) print(smallestdivisibleby_4(N))
nhìn gì
hello
eeeeee
nguyên
huy
1//1//1/1/11//1/1 khó
1\
khó quá có ai vhir ko
b evdfcaeb
.
:0
duybaothcq
This comment is hidden due to too much negative feedback. Show it anyway.
có bạn nào giải scratch cho xin tham khảo với,xin cảm ơn
code python cho ai bí idea: n = int(input()) s = list(map(int, str(n))) if len(s) > 2: k = 2 if n % 4 != 0: if n % 2 == 0: s[len(s) - 2] = 0 if s[len(s) - 1] % 4 == 0 else 1 else: s[len(s) - 1] = 0 if s[len(s) - 2] % 2 == 0 else 1 k -= 1 i = 1 if s[0] != 1: s[0] = 1 k -= 1 while k > 0 and i < len(s): if s[i] != 0: s[i] = 0 k -= 1 i += 1 print("".join([str(x) for x in s])) elif len(s) == 2: print(12) else: print(0)
Có bạn nào có code của scratch không? chỉ mik với, mình làm bị sai hoài à T^T Mắc kẹt ở bài này hơn 5 ngày rồi
tui có nè
solve: https://codebeautify.org/alleditor/y240053b6
cảm ơn nhen!
This comment is hidden due to too much negative feedback. Show it anyway.
Bạn có thể cung cấp thêm thông tin về tình trạng tài khoản bị người xấu sử dụng thông qua email của Ban Tổ chức Hội thi tại tainangviet.twd@gmail.com để được xem xét. Trân trọng cảm ơn.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
ACC duybaothcq của tôi tự nhiên bị khoá tôi không làm gì hết có thằng tự nhiên vào acc phá tôi nhá admin hãy trả lại acc cho tôi được không?
Bạn có thể cung cấp thêm thông tin về tình trạng tài khoản bị người xấu sử dụng thông qua email của Ban Tổ chức Hội thi tại tainangviet.twd@gmail.com để được xem xét. Trân trọng cảm ơn.
ai bt làm ko cứu tui
ai biết làm không vậy
tui biết , cần code python không tôi gửi cho
Tui
def xuli(s, pos, kitu): sy = s[pos + 1:]; sx = s[:pos]; return sx + str(kitu) + sy; s = input(); n = len(s) s1 = s; res = 10**18; for i in range(1, 10): s1 = xuli(s1, 0, i) temp = s1; for j in range(1, n): s1 = temp; for k in range(10): s1 = xuli(s1, j, k); if int(s1) % 4 == 0: res = min(res, int(s1)); s1 = s; for t in range(1, n): s1 = s; for i in range(10): s1 = xuli(s1, t, i) temp = s1; for j in range(1, n): s1 = temp; for k in range(10): if int(s1) % 4 == 0: res = min(res, int(s1)); s1 = xuli(s1, j, k); print(res)
ai biết làm không vậy
hi
xin chào
This comment is hidden due to too much negative feedback. Show it anyway.
làm thế nào vậy
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.