Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- N = int(input('Введите двухзначное число: '))
- q = int(input('Введите одно число от 1 до 9 вкл: '))
- if N >= 10 and N <= 99: # N - двухзначное
- if q >= 1 and q <= 9: # требования q от 1 до 9
- if N//10 == 5 or N%10 == 5: # одно из чисел в N == 5
- print('a) YES', 'б) YES')
- if N//10 == q or N%10 == q: # одно из чисел в N от 1 до 9
- print('a) NO', 'б) YES')
- else:
- print('a) NO', 'б) NO')
- else:
- print('a) NO', 'б) NO')
- else:
- print('a) NO', 'б) NO')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement