<!DOCTYPE html>
<head>
<script>
window.location.href = "url.com"
</script>
</head>
#include <iostream>
using namespace std;
int main()
{
int numb;
cin >> numb;
int mas[5];
int kilkmas = 0;
for (int i = 0; i < 5; i++)
{
int ostdiv = numb % 2;
if (ostdiv == 0)
mas[kilkmas] = 0;
else
mas[kilkmas] = 1;
kilkmas++;
numb = numb / 2;
}
for (int i = 4; i >= 0; i--)
{
if (i != 4 && !mas[i])
cout << mas[i];
}
}
import telebot
import random
bot = telebot.TeleBot('TOKEN')
print("Bot started")
@bot.message_handler(commands=['start'])
def start_message(message):
bot.send_message(message.chat.id, '/random')
chars = '1234567890'
number = 10
length = 6
def password():
for n in range(number):
password = ''
for i in range(length):
password += random.choice(chars)
return password
@bot.message_handler(content_types=['text'])
def send_text(message):
if message.text.lower() == '/random':
bot.send_message(message.chat.id, 'Your code: ' + password())
bot.polling()