Category: Quiz

십진수와 이진수 서로 바꿔보기

1. 십진수를 이진수로 바꾸기십진수를 이진수로 바꾸는 방법부터 정리한다. 십진수를 2 미만이 될때까지 2로 계속 나누고, 나눌때마다 발생하는 나머지를 이진수로 저장하는 원리이다. 위의 문장만으로 벌써 반복문 조건이 완성된다. 1234567int[] binaries = new int[32];int = 0;while(integer>=2) {

Hackerrank - Java Datatype

ProblemJava has 8 primitive data types; char, boolean, byte, short, int, long, float, and double. For this exercise, we’ll work with the primitives used to hold integer values (byte, short, int, and

Leetcode - Twosum

Problem Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and

백준 1110번.java

백준 문제 중 풀었던 문제를 다시 풀어보는중 처음 풀었을때도 고생했고, 다시 풀어도 고생한 문제를 정리해보려고 한다. 한시간 이상 풀었는데, 풀고나니까 민망하다… 그럼에도 다시 한 번 공개적으로 정리를 해야 다음번에는 술술 풀 수 있을것이란 기대를 안고 정리해본다.. 1110번 문제 링크 문제0보다 크거나 같고, 99보다 작거나 같은 정수가 주어질 때