목록YJ (375)
코딩로그

[문제] Sue loves her mp3 player but she hates the fact that her shuffle mode plays her tracks randomly. Because she loves order and patterns she would like the tunes on her mp3 player to be played in alphabetical order. In this problem you have to help Sue by sorting her tunes into alphabetical order of tune name. [입력] Input consists of a number of scenarios, each beginning with a single positive ..

[문제] After several months struggling with a diet, Jack has become obsessed with the idea of weighing less. In an odd way, he finds it very comforting to think that, if he had simply had the luck to be born on a different planet, his weight could be considerably less. Of course, the planets are far out of reach, but even the Earth’s moon would yield a dramatic weight loss. Objects on the moon wei..

[문제] Mike wrote some text on a piece of paper and now he wants to know how many holes are in the text. What is a hole in this context? If you think of the paper as the plane and a letter as a curve on the plane, then each letter divides the plane into regions. For example letters "A" and "O" divide the plane into two regions so we say these letters each have one hole. Similarly, letter "B" has t..

[문제] The amount of income tax imposed on any taxpayer depends on his/her income. For an income less than or equal to 1,000,000 Oshloobs, no tax is paid. For an income greater than 1,000,000 and less than or equal to 5,000,000 Oshloobs, the tax is 10% of the income. For an income over 5,000,000 Oshloobs, the tax is 20% of the income. You should write a program to calculate the net income of any g..

[문제] 1부터 20까지 숫자가 하나씩 쓰인 20장의 카드가 아래 그림과 같이 오름차순으로 한 줄로 놓여있다. 각 카드의 위치는 카드 위에 적힌 숫자와 같이 1부터 20까지로 나타낸다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 카드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 이제 여러분은 다음과 같은 규칙으로 카드의 위치를 바꾼다: 구간 [a, b] (단, 1 ≤ a ≤ b ≤ 20)가 주어지면 위치 a부터 위치 b까지의 카드를 현재의 역순으로 놓는다. 예를 들어, 현재 카드가 놓인 순서가 위의 그림과 같고 구간이 [5, 10]으로 주어진다면, 위치 5부터 위치 10까지의 카드 5, 6, 7, 8, 9, 1..

[문제] 시작 -> 실행 -> cmd를 쳐보자. 검정 화면이 눈에 보인다. 여기서 dir이라고 치면 그 디렉토리에 있는 서브디렉토리와 파일이 모두 나온다. 이때 원하는 파일을 찾으려면 다음과 같이 하면 된다. dir *.exe라고 치면 확장자가 exe인 파일이 다 나온다. "dir 패턴"과 같이 치면 그 패턴에 맞는 파일만 검색 결과로 나온다. 예를 들어, dir a?b.exe라고 검색하면 파일명의 첫 번째 글자가 a이고, 세 번째 글자가 b이고, 확장자가 exe인 것이 모두 나온다. 이때 두 번째 문자는 아무거나 나와도 된다. 예를 들어, acb.exe, aab.exe, apb.exe가 나온다. 이 문제는 검색 결과가 먼저 주어졌을 때, 패턴으로 뭘 쳐야 그 결과가 나오는지를 출력하는 문제이다. 패턴에..

[문제] 어느 날, 상근이의 여자친구는 상근이에게 매우 긴급한 목소리로 전화했다. "상근아, 나 급하게 지워야 될 파일이 있어! 이 파일은 절대 복구되면 안돼." 파일을 완전 삭제하려면 하드드라이브에서 그 구간을 새로운 데이터로 반복해서 덮어써야 한다. 상근이는 여자친구를 위해 파일 완전 삭제 프로그램을 만들려고 한다. 파일 완전 삭제 프로그램은 매우 간단하다. 사용자는 삭제할 파일을 하나 고르고, 몇 번 덮어씌울지 n을 입력한다. n은 1부터 20까지 숫자 중 하나를 골라야 한다. 상근이의 프로그램은 파일을 비트단위로 덮어씌운다. 한 번 덮어씌울 때, 0인 비트는 1로, 1인 비트는 0으로 덮어씌운다. 상근이는 프로그램을 완성했고 테스트해보려고 한다. 파일을 삭제하기 전에 파일이 있었던 곳의 비트와 파..

[문제] 팬그램은 알파벳의 모든 글자들을 사용해서 만든 문장이다. "the quick brown fox jumps over a lazy dog"과 "jackdaws loves my big sphinx of quartz"은 팬그램이다. 문장이 주어졌을 때, 팬그램인지 아닌지를 알아내는 프로그램을 작성하시오. [입력] 입력은 여러 테스트 케이스로 이루어져 있다. 각 테스트 케이스는 많아야 200글자로 이루어져 있는 문장이다. 단어는 공백 하나로 구분되어 있다. 또, 단어는 알파벳 소문자로만 이루어져 있다. 입력의 마지막 줄에는 별표(*)가 하나 주어진다. [출력] 각 테스트 케이스에 대해서, 입력으로 주어진 문장이 팬그램이라면 'Y', 아니라면 'N'를 출력한다. [Source Code] #include #..