정수 제곱근 판별 2가지 방법 Math.sqrt() vs Math.pow() Math.sqrt import java.util.*; class Solution { public long solution(long n) { if(Math.sqrt(n)==(int)Math.sqrt(n)) return (long)Math.pow(Math.sqrt(n)+1,2); return -1; } } Math.pow ( 출력시 Type 변환 필요 ) import java.util.*; class Solution { public long solution(long n) { for(int i = 0;i*i
분류 전체보기

BOX border: {width} {style} {color} padding - Box 내부 여백 margin - 테두리 밖 여백 ( box간 margin은 중첩됨 ) width/height - 너비,높이 Lorem ipsum dolor sit amet consectetur, adipisicing elit. Officia, expedita. Lorem ipsum dolor sit amet consectetur, adipisicing elit. Officia, expedita. box-sizing: border-box - border 기준으로 사이징 box-sizing: content-box - content 기준으로 사이징 ( default ) small border Large border
HashSet 중복된 값(원소)는 추가되지 않는 특성을 가짐 package practice; import java.util.*; public class hashset { public static void main(String[] args) { /////////////////////////////////////////////// System.out.print("1. 추가 : "); Set hashSet = new HashSet(); hashSet.add("APPLE"); hashSet.add("BANANA"); hashSet.add("ORANGE"); Iterator it = hashSet.iterator(); while(it.hasNext()) System.out.print(it.next()+" "); ..
Combination A: 4, B: 3, C;5 를 조합할때, 1~3개의 조합 경우의수 구하기 ★★★ (A+1)*(B+1)*(C+1) = ABC + AB + BC + CA + A + B + C + 1 ※ 모두 고르지 않는 경우인 상수는 제외. Solution : ( 4 + 1 ) * ( 3 + 1 ) * ( 5 + 1 ) -1 import java.util.*; class Solution { static int answer = 1; public int solution(String[][] clothes) { HashMap hm = new HashMap(); for(int i=0;i

Color 3가지 Type으로 출력 가능 color 참조 링크 : www.w3schools.com/css/css_colors.asp CSS Colors CSS Colors Colors are specified using predefined color names, or RGB, HEX, HSL, RGBA, HSLA values. CSS Color Names In CSS, a color can be specified by using a predefined color name: Try it Yourself » CSS/HTML support 140 standard color names. CSS Backgrou www.w3schools.com font-size px(pixel) : 절대값으로 적용 rem : 유저..

선택자 전체선택자 : * { color:red; } 태그선택자 : p { color:red; } or div { color:red; } 클래스선택자 : .class { color:red; } or div.class { color:red; } ID선택자 : #id { color:red; } or div#id { color:red; } 복합선택자 #id>tag tag tag HTML CSS JavaScript HTML CSS selector declaration JavaScript 가상클래스 선택자 ( pseudo ) :link - 방문한 적이 없는 링크 :visited - 방문한 적이 있는 링크 :hover - 마우스를 롤오버 했을 때 :active - 마우스를 클릭 했을 때 :focus - Focus가 ..