Submit solution
Points:
100.00 (partial)
Time limit:
1.0s
Memory limit:
512M
Input:
stdin
Output:
stdout
Problem type
Allowed languages
C++, Pascal, Python, Scratch
Comments
ai có công thức tổ hợp ko=))))
n = int(input()) sc = n//2 sl = n-sc if n%2!=0: sl-=1 tsl = sl(sl+1)//2 x = n-1 if x%2==0: sh = (x-2)//2+1 tsc = sh(x+2)//2 else: sh = (x-1)//2+1 tsc = sh*(x+1)//2 print(tsc+tsl)
:)) ai có công thức tổ hợp ko chứ dùng for 2 vòng ếu dc
n = int(input()) sc = n//2 sl = n-sc if n%2!=0: sl-=1 tsl = sl(sl+1)//2 x = n-1 if x%2==0: sh = (x-2)//2+1 tsc = sh(x+2)//2 else: sh = (x-1)//2+1 tsc = sh*(x+1)//2 print(tsc+tsl)
Nếu những bạn học sinh vào có kinh nghiệm thì bài này chắc đối với họ sẽ dễ hơn so với những người mới thi được 1,2 năm.
k hiểu gì cả, ai giúp tuii với ạa :<<
:)) dùng công thức tổ hợp thôi mấy man
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.
chi tui cach lam di
bai nay de qua
bai nay de nha :))
phun test ko
This comment is hidden due to too much negative feedback. Show it anyway.
Bài này dùng công thức nha mọi người. Spoiler cho bài CẶP SỐ CHẴN
This comment is hidden due to too much negative feedback. Show it anyway.
bài quá khó
AB la so nguyen duong luon ha moi nguoi? 🙄🙄🙄
Nó ghi 1 <= A <= B <= N mà
ừ
This comment is hidden due to too much negative feedback. Show it anyway.
khá khó đấy
This comment is hidden due to too much negative feedback. Show it anyway.
Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó Khó
This comment is hidden due to too much negative feedback. Show it anyway.