본문 바로가기

전체 글

(49)
[Project Euler]5. Smallest multiple [문제] 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? [풀이] total = 1 for i in range(1,21): result = [] for j in range(2,21): if total %j==0 and i%j==0: while total%j==0 and i%j==0: i=int(i/j) total=int(total/j) result.append(j) for a in resul..
[Project Euler]4. Largest palindrome product [문제] A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. [풀이] a = list(range(100,1000)) a.reverse() result_list=[] for i in a: for j in a: result=str(i*j) if len(result)%2==0: if result[0]==result[-1] and result[1]==result[-2] and result[2]==..
[Project Euler]3. Largest prime factor [문제] The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? [풀이] 2021.05.24 def find_primeNumber(n): primeNumbers = [2,3] if n
[UiPath] iterator에서 원하는 값 찾기 iterator에서 원하는 값을 찾는 방법은 다양하다. (사실 다양하다고 했지만 당장 생각나는 방법은 두개뿐이다 ㅎㅎ) for문안에 if를 넣어서 찾아도 되고 Where를 사용해서 찾아도 된다. for로 찾는건 쉬우니 Where로 찾는 것을 포스팅해볼 예정이다~~ 특정 Path에 내가 원하는 파일이 있느냐 할 때 상당히 많이 쓰여서 Path 파일들 중 원하는 파일 찾기를 할 것이다. strPath = "파일을 찾고자 하는 Path" arrPathFiles = Directory.GetFiles(strPath) 우선 Path와 Path안의 파일을 변수로 받아왔다. arrPathFiles는 String의 1차배열로 Path안의 디렉토리는 제외하고 모든 파일을 가져온다. (임시파일도 가져오며 오늘 글을 쓰게 된..
[Project Euler]2. Even Fibonacci numbers [문제] Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. [풀이] def Fibo(n): result = [] if n==1: result = [1] elif n==2: result = [1,2] else..
[Project Euler]1. Multiples of 3 and 5 [문제] If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. [풀이] result = 0 for i in range(1,1001): if i%3==0 or i%5==0: result+=i print(result)
점프 투 파이썬 독학 끝! 얼마전.. 선전포고를 했다... 점프 투 파이썬(https://wikidocs.net/2) 2주만에 끝내기 2021-05-13에 시작해서 방금 2021-05-21에 완료했다!! 기특하다!!! 이 뒤로는 뭘할까.. 고민을 좀 했는데 1일 1커밋을 해볼까 하다가 분명.. 하지도 않으면서 스트레스 받을 나를 알기에! 나중에 내가 구상해놓은 프로젝트에 틀이 대강 잡히면 그때 Git을 만들어보기로 하고 우선은 블로그에 그날 푼 이것저것 올릴 예정~ 먼저 시작할 건 프로젝트 오일러(https://projecteuler.net/archives) 문제 풀기 2021년도 목표는 UiPath와 Python이 합쳐진 나의 프로젝트를 만드는 것! (합치는게 의미가 있을까 아직은 .. 잘 모르겠음)
[UiPath] Chrome Alert Selector 요즘 크롬 개발건이 꽤 많다. 근데 문제는 크롬의 Aelrt창 셀렉터가 안잡힌다는 것이다! 방금 해봤는데... 커뮤니티버전 2020.10.2에서 잘 잡힌다!!!! ㄱ- 하지만 기업에선 업데이트를 자주 하지 않는다. 분명히... 크롬 개발건이 들어오지만 크롬 셀렉터가 안잡히는 버전의 UiPath를 쓰는 기업도 있을거다! 지금의 나같이.... 암튼... 셀렉터가 안잡힌다면 다음과 같이 셀렉터를 변경해서 쓰면 된당.. 끝... 이건 버튼 셀렉터... 진짜 끝......