Programming/Python
[정올] 1516 : 단어 세기
[정올] 1516 : 단어 세기
2020.03.31text = [] for i in range(200): temp = input() if(temp == 'END'): break else: text.append(temp) list_count = len(text) result = [] for i in range(list_count): temp = text[i].split() result.append(temp) # print(result) w_count = {} for i in range(1): for test in result[i]: try : w_count[test] += 1 except : w_count[test] = 1 print('\n') # from collections import Counter # wordDict = Counter() # for..
[정올] 2604:그릇
[정올] 2604:그릇
2020.03.27a = input() result = list(a) list_count = len(result) height = 10 for i in range (1, list_count): if (result[i] == result[i - 1]): height += 5 elif (result[i] != result[i - 1]): height += 10 else: print("Err") print(height) https://github.com/kim-do-hyeon/jungol/blob/master/2604/2604.py kim-do-hyeon/jungol Contribute to kim-do-hyeon/jungol development by creating an account on GitHub. github.com
[정올] 2814 : 이진수
[정올] 2814 : 이진수
2020.03.25num = input() if(len(num) > 30): print("err") else: print(int(num,2)) https://github.com/kim-do-hyeon/jungol/blob/master/2814/2814.py kim-do-hyeon/jungol Contribute to kim-do-hyeon/jungol development by creating an account on GitHub. github.com
[정올] 1534 : 10진수를 2,8,16진수로
[정올] 1534 : 10진수를 2,8,16진수로
2020.03.25num = input() temp = num.split(' ') value = int(temp[1]) num = int(temp[0]) if (value == 2): print(format(num, 'b')) if (value == 8): print(format(num, 'o')) if (value == 16): temp = format(num, 'x') temp = temp.upper() print(temp) https://github.com/kim-do-hyeon/jungol/blob/master/1534/1534.py kim-do-hyeon/jungol Contribute to kim-do-hyeon/jungol development by creating an account on GitHub. gi..
[정올] 1430 : 숫자의 개수
[정올] 1430 : 숫자의 개수
2020.03.25A = int(input()) B = int(input()) C = int(input()) result = A * B * C result_list = list(str(result)) for i in range(10): result_num_list = result_list.count(str(i)) print(result_num_list) https://github.com/kim-do-hyeon/jungol/blob/master/1430/1430.py kim-do-hyeon/jungol Contribute to kim-do-hyeon/jungol development by creating an account on GitHub. github.com
[정올] 2809 : 약수
[정올] 2809 : 약수
2020.03.24n = int(input()) for i in range(int(1)): d = [] for i in range(1, int(n**0.5)+1): if n%i == 0: d.append(i) if i!=n//i: d.append(n//i) sort = d.sort() print(" ".join(map(str, d))) https://github.com/kim-do-hyeon/jungol/blob/master/2809/2809_success.py
[정올] 1658 : 최대공약수와최소공배수
[정올] 1658 : 최대공약수와최소공배수
2020.03.24from math import gcd def lcm(x,y): return x * y // gcd(x,y) a = input() temp = a.split(' ') print(gcd(int(temp[0]), int(temp[1]))) print(lcm(int(temp[0]), int(temp[1]))) https://github.com/kim-do-hyeon/jungol/blob/master/1658/1658.py kim-do-hyeon/jungol Contribute to kim-do-hyeon/jungol development by creating an account on GitHub. github.com
python - 공백줄 삭제
python - 공백줄 삭제
2020.03.15print "".join([s for s in t.strip().splitlines(True) if s.strip()])
Python - Volatility Cmdscan 에서 중요한 정보만 추출하기
Python - Volatility Cmdscan 에서 중요한 정보만 추출하기
2019.11.211 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 #Written by Pental #Cmdscan 결과 추출 print ("Source by Pental / Extract CmdScan Result") import re import string # Function #Find Unique Word def findSentence(fileName, findText): file = open(fileName, mode="r", encoding="utf8") result = [] data = file.read() data = data.splitlines() for line in data: se..
Python - Volatility pslist 에서 특정 프로세스만 추출하기
Python - Volatility pslist 에서 특정 프로세스만 추출하기
2019.11.211 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 #Written by Pental # 특정 프로세스 정보 추출 import re import string import sys # Function #Find Unique Word def findSentence(fileName, findText): file = open(fileName, mode="r", encoding="utf8") result = [] data = file.read() data = data.splitlines() for line in dat..
Python - Volatility ImageInfo 에서 중요한 결과만 추출하기
Python - Volatility ImageInfo 에서 중요한 결과만 추출하기
2019.11.201 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 #Written by Pental import re import string # Function #Find Unique Word def findSentence(fileName, findText): file = open(fileName, mode="r", encoding="utf8") result = [] data = file.re..