영화 Kraftidioten (in order of disappearance) 2014

이미지
노르웨이 영화 "Kraftidioten"  영어제목 In order of disappearance 한국어 제목 사라짐의 순서:지옥행 제설차 스웨덴 배우 스텔란 스카스가드 주연 드라마 체르노빌에도 나온 배우 느와르? 코믹? 잔혹물? 한가지 기억에 남는 점은 저 나라에서는 시체처리가 참 쉽겠다... 모범시민상을 받을 정도로 바른 생활의 아저씨가 나쁜 놈들을 하나씩 골로 보내버리는... 무더운 여름에 한번 볼 만한 영화  

콘웨이 Conway 박사의 '게임오브라이프'

이미지
참고 사이트 :   http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life   이 게임을 간략하게 설명하자면,  2차원 격자로 형성된 무한평면에서 하나의 격자(cell)를 생명단위로 설정하고 주변 8개 셀들의 영향으로 살아남거나 소멸하거나 또는 탄생하는 규칙을 정해서 다음 세대로 전이되어가는 상태를 보여줍니다. 마치 세포들이 생성되고 소멸되는 모습을 보는 듯 하죠. 물론 이 프로그램에서는 무한평면이 아닙니다.   영국의 수학자인  John Horton Conway  박사가 1970년에 고안했다고 합니다. 룰은 4가지 입니다.   * Any live cell with fewer than two live neighbours dies, as if caused by under-population. * Any live cell with two or three live neighbours lives on to the next generation. * Any live cell with more than three live neighbours dies, as if by overcrowding. * Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.   1. 살아있는 셀 A의 주변 8개 셀 중에 2개 미만의 수(즉, 0 또는 1개)가 살아있을때 A셀은 죽어버립니다. 왜? 외로워서... 2. 살아있는 셀 A의 주변 8개 셀 중에 2개 또는 3개의 셀이 살아있을때 A셀은 살아남습니다. 3. 살아있는 셀 A의 주변 8개 셀 중에 4개 이상의 셀(4 ~ 8개)이 살아있을때 A셀의 죽어버립니다. 왜? 살기가 복잡해서... 4. 죽어있는 셀 A의 주변 8개 셀 중에 정확히 3개의 셀이 살아있을때 죽어있는 A셀이 살아납니다.    4...

소수 확인 간단한 코드 C++ How to check the prime numbers?

/*  by ESP bbaddo 3.April.2021   입력범위 1 ~ 18,446,744,073,709,551,615 unsigned long long */ #include <stdio.h> #include <iostream> #include <sstream>  #include <string> using namespace std; template <typename T>  //소수점12자리까지 문자열로 변환 string to_string_with_precision(const T value, const int n = 12) { ostringstream out; out.precision(n); out << std::fixed << value; return out.str(); } template <typename T>  //천단위 쉼표, 여기서 unsigned long long 만 쓰지만 템플레이트로 구현 string sep_thousands(const T value) { const char* locale_name = "english"; #ifdef WINDOWS locale_name = "korean"; #endif ostringstream out; out.imbue(locale(locale_name)); out << value; return out.str(); } string checkPrimeNumber(unsigned __int64); int main()  //실행 ctrl + F5 { unsigned __int64 inputNumber = 0; while(true) { cout << "******* 소수 prime number 판별기 *******" << endl; cout << "입력 : "; ...