A. FizzBuzz #1
Xotira: 330 MB, Vaqt: 100000 mslet the number be FizzBuzz if divided by 3 and 7, let it be “Fizz” if divisible by only 3, let it be “Buzz” if divisible by only 7, otherwise let it be "bad"
A son kirib keladi
javobni chiqaring
# | INPUT.TXT | OUTPUT.TXT |
---|---|---|
1 |
3 |
Fizz |
2 |
7 |
Buzz |
3 |
21 |
FizzBuzz |
B. FizzBuzz #2
Xotira: 32 MB, Vaqt: 1000 msGiven an integer n, for every integer i <= n, the task is to print “FizzBuzz” if i is divisible by 3 and 5, “Fizz” if i is divisible by 3, “Buzz” if i is divisible by 5 or i (as a string) if none of the conditions are true.
N kirib keladi
Javob ni chop eting
Iterate on the given number from 1 to n, check its divisibility and add the string into result according to the given condition.
# | INPUT.TXT | OUTPUT.TXT |
---|---|---|
1 |
3 |
1 2 Fizz |
C. Print
Xotira: 32 MB, Vaqt: 1000 ms.
.
.
.
# | INPUT.TXT | OUTPUT.TXT |
---|---|---|
1 |
Faqatgina "Hello world" ni chop eting |
bu exapmle emas |
D. Bir o'lchamli massivning o'rtacha qiymati...
Xotira: 32 MB, Vaqt: 1000 msn-natural son va x(n) ketma-ketlik berilgan bo'lsin. Bir o'lchamli massivning o'rtacha
qiymatiga teng bo'lgan elementlar sonini toping.
cheksizgacha bo'lgan sonlar kirib kelishi mumkin
Javobni chop eting
.
# | INPUT.TXT | OUTPUT.TXT |
---|---|---|
1 |
1 2 3 4 5 6 3 7 3 |
3 |
E. IQ #1
Xotira: 32 MB, Vaqt: 1000 msIQ ni ishlating
# | INPUT.TXT | OUTPUT.TXT |
---|
F. IQ #2
Xotira: 32 MB, Vaqt: 1000 mshech narsa
# | INPUT.TXT | OUTPUT.TXT |
---|
G. IQ #3
Xotira: 32 MB, Vaqt: 1000 mshech narsa
# | INPUT.TXT | OUTPUT.TXT |
---|