프로그래밍 썸네일형 리스트형 [주인장] 2010년 5월 20일 C# 실습~ //호텔 문 열고 닫고하고.. 최종 열려있는 문 찾기 실습예제 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Hotel { class Program { static void Main(string[] args) { /* int[] door = new int[100]; int i,human = 1; int count = 0; while (human < 101) { for (i = human; i < 101; i=i+human) { door[i-1] = (door[i-1]==1? 0 : 1); } human++; } for (i = 0; i < 100; i++) { if (door[i].. 더보기 [푸르딩~] 100개의 방, 100명의 사람 배수의 방문 열기 (새로 열린것은 닫기) namespace ConsoleApplication1 { class Program { static void Main(string[] args) { /* 100개의 방이 있다. 100명의 사람 배수의 방문 번호를 연다 (닫혀있으면 닫는다), 닫힌문0, 열린문1 */ int[] Room = new int[101]; int n,l; int result = 0; for (n = 1; n 더보기 이전 1 2 3 4 다음