Условие: У тебя есть список строк — чисел от 1 до 100, но одно из чисел случайно пропало. Найди, какое число отсутствует. Нельзя использовать sum(), sorted(), Counter. Все числа в списке представлены как строки.
Пример:
import random
original = [str(i) for i in range(1, 101)] missing = random.choice(original) shuffled = original.copy() shuffled.remove(missing) random.shuffle(shuffled)
✅Пояснение: - xor_full — XOR всех чисел от 1 до 100. - xor_data — XOR всех чисел в текущем списке (`str` → `int`). - Разность xor_full ^ xor_data вернёт единственное отсутствующее число.
🎯 Пример использования:
```python original = [str(i) for i in range(1, 101)] original.remove("42") random.shuffle(original)
print(find_missing_number(original)) # → 42 ```
🔥 Эта задача хороша тем, что: • содержит хитрый запрет на sum() • требует знания побитовых операций • работает с типами (`str` vs `int`) • подходит для собеседования уровня middle+
Условие: У тебя есть список строк — чисел от 1 до 100, но одно из чисел случайно пропало. Найди, какое число отсутствует. Нельзя использовать sum(), sorted(), Counter. Все числа в списке представлены как строки.
Пример:
import random
original = [str(i) for i in range(1, 101)] missing = random.choice(original) shuffled = original.copy() shuffled.remove(missing) random.shuffle(shuffled)
✅Пояснение: - xor_full — XOR всех чисел от 1 до 100. - xor_data — XOR всех чисел в текущем списке (`str` → `int`). - Разность xor_full ^ xor_data вернёт единственное отсутствующее число.
🎯 Пример использования:
```python original = [str(i) for i in range(1, 101)] original.remove("42") random.shuffle(original)
print(find_missing_number(original)) # → 42 ```
🔥 Эта задача хороша тем, что: • содержит хитрый запрет на sum() • требует знания побитовых операций • работает с типами (`str` vs `int`) • подходит для собеседования уровня middle+
Investors took profits on Friday while they could ahead of the weekend, explained Tom Essaye, founder of Sevens Report Research. Saturday and Sunday could easily bring unfortunate news on the war front—and traders would rather be able to sell any recent winnings at Friday’s earlier prices than wait for a potentially lower price at Monday’s open. Given the pro-privacy stance of the platform, it’s taken as a given that it’ll be used for a number of reasons, not all of them good. And Telegram has been attached to a fair few scandals related to terrorism, sexual exploitation and crime. Back in 2015, Vox described Telegram as “ISIS’ app of choice,” saying that the platform’s real use is the ability to use channels to distribute material to large groups at once. Telegram has acted to remove public channels affiliated with terrorism, but Pavel Durov reiterated that he had no business snooping on private conversations. The SC urges the public to refer to the SC’s I nvestor Alert List before investing. The list contains details of unauthorised websites, investment products, companies and individuals. Members of the public who suspect that they have been approached by unauthorised firms or individuals offering schemes that promise unrealistic returns "We as Ukrainians believe that the truth is on our side, whether it's truth that you're proclaiming about the war and everything else, why would you want to hide it?," he said. "Your messages about the movement of the enemy through the official chatbot … bring new trophies every day," the government agency tweeted.
from sa