n = int(input())
count = 0
result = 665
while True:
result += 1 #<- 증가/ 감소시킬 때는, 조건문 통과후에 하는 것이 안전함!
if str(result).find('666') != -1: # 문자안에 '666'이 포함되어 있을 경우
count += 1
if count == n:
break
print(result)
from collections import Counter # 레데카 심볼 카테고리별 갯수 count 할 때 사용했던 라이브러리
word = list(input().upper())
count = dict(Counter(word)) # collection 라이브러리의 Counter 활용하여, 단어의 원소 갯수세기
max_value = max(count.values()) # 가장 많이 사용된 원소의 갯수
word_count = dict(filter(lambda item : item[1] == max_value, count.items())) # 가장 많이 사용된 원소 모두 가져오기
if len(word_count) >= 2: # 가장 많이 사용된 원소가 2개 이상일 경우
print('?')
else: # 가장 많이 사용된 원소가 1개일 경우
print(list(word_count.keys())[0])
This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
(원인) function 을 생성할 수 있는 권한이 없어서 발생한 오류이다.
(해결방법) log_bin_trust_function_creators 옵션을 활성화하여, 권한을 부여한다. 권한 부여하는 방법은 아래 코드 참고한다.
SET GLOBAL log_bin_trust_function_creators = 1;
SET @@SQL_MODE='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION’;