Telefoningiz jiringlaydi agar javob berishingiz kerak bo`lsa true qiymat qaytarilsin. Odatda siz uni ko`tarasiz, istisno sifatida ertalablari onangiz telefon qilganidagina ko`tarasiz.Qolgan barcha hollarda, agar uxlayotgan bo`lsangiz siz telefonga javob bermaysiz.
answerCell(false, false, false) → true
answerCell(false, false, true) → false
answerCell(true, false, false) → false
15.
teaParty
We are having a party with amounts of tea and candy. Return the int
outcome of the party encoded as 0=bad, 1=good, or 2=great. A party is
good (1) if both tea and candy are at least 5. However, if either tea or candy
is at least double the amount of the other one, the party is great (2).
However, in all cases, if either tea or candy is less than 5, the party is
always bad (0).
Biz choy va konfetlar bilan bazim uyushtiryapmiz. Bazim natijasini butun son ko`rinishida 0=yomon, 1=yaxshi, yoki 2=ajoyib. Agar bazimda choy va konfetlar miqdori kamida 5 ta bo`lsa 1, agar ikkalasidan birining miqdori nargisinikidan kamida 2 barobar ko`p bo`lsa 2, qolgan barcha hollarda, konfet yoki choy miqdori 5 dan kam bo`lganda 0 qiymat qaytarilsin. teaParty(6, 8) → 1
teaParty(3, 8) → 0
teaParty(20, 6) → 2
16.
fizzString
Given a string str, if the string starts with "f" return "Fizz". If the string ends
with "b" return "Buzz". If both the "f" and "b" conditions are true, return
"FizzBuzz". In all other cases, return the string unchanged. (See
also:
FizzBuzz Code
)
Str string qiymat berilgan, agar satr “f” bilan boshlansa “Fizz” qiymat, Agar “b” bilan tugasa “Buzz” qiymat qaytarilsin.Agar yuqoridagi har ikki holat ham to`g`ri bo`lsa, “FizzBuzz” qiymati