«random» 태그된 질문

난수 및 / 또는 출력과 관련된 작업.

10
잠재적으로 큰 파일에서 n 개의 임의 행을 읽습니다.
이 과제는 전체 파일을 메모리로 읽지 않고 잠재적으로 큰 파일에서 임의의 행을 읽는 것입니다. 입력 n텍스트 파일 의 정수 및 이름입니다. 산출 n 대체하지 않고 무작위로 균일하게 선택된 텍스트 파일의 행. n파일의 1-행 수 범위에 있다고 가정 할 수 있습니다 . n당신이 얻는 대답이 균일 한 범위에서 무작위로 숫자를 샘플링 …

24
반복없는 무작위 배열
나는 여기서 하나의 도전에 대답하고 있었고이 과제는 도전의 일부였습니다. 자바 스크립트에 73 바이트 솔루션이 있습니다. 그러나 나는 그것이 단순한 것을하기에는 너무 많다고 생각합니다. 도전 두 개의 정수를 입력으로 제공합니다. N 예상되는 배열의 길이 R: 간격의 하나부터 범위입니다 1..R,하지0..R-1 프로그램 / 함수의 각 실행 에서 하나의 값이 두 번 이상 발생하지 …

2
체스-오션 더비
체스와 철거 더비 보다 더 정반대가 될 수있는 것 . 당신은 어느 날을 즐기는 사람은 오늘까지 다른 사람을 즐기지 않을 것이라고 생각할 것입니다. 규칙 시작 위치는 표준 체스 판입니다. RNBQKBNR PPPPPPPP PPPPPPPP RNBQKBNR 당신이 그것이 ITLESF에 대한 모든 조각, 마지막 조각 스탠딩 경쟁 이라는 것을 알 때까지는 정상적으로 보입니다 . …

4
ASCII 피보나치 시계 만들기
누군가 피보나치 숫자를 사용하여 정말 멋진 시계 를 만들었습니다. 우리가 좋아하는 방식! 이것을 다시 만들어 봅시다. 시계는 1부터 시작하여 처음 5 개의 피보나치 수에 해당하는 5 개의 섹션으로 구성됩니다 (예 : 1, 1, 2, 3, 5). ccbeeeee ccaeeeee dddeeeee dddeeeee dddeeeee 시계는 12 시간을 5 분 단위로 표시 할 수 …

27
발음하기 쉬운 단어 생성
도전은 간단하다 : 단어를 생성하십시오. 명세서: 단어는 발음 할 수 있어야합니다. 이것은 "자음과 모음 사이의 대체"로 정의됩니다. 자음은 다음 문자 중 하나입니다. bcdfghjklmnpqrstvwxz 모음은 다음 문자 중 하나입니다. aeiouy 단어는 무작위로 생성되어야합니다. 단어는 모든 자음과 모음을 포함 할 수 있어야합니다. ( bcdf자음과 aei모음 에만 사용할 수는 없습니다 .) 단어는 10 …

6
이중 슬릿 실험
게으른 물리학자는 이중 슬릿 실험을 수행해야합니다. 그러나 그들은 게으르고 모든 장비를 스스로 설정하기 위해 귀찮게 할 수 없으므로 효과를 시뮬레이트 할 것입니다. 그들은 프로그래밍을 할 수 없지만 도움이 필요할 것입니다. 그들이 게 으르므로 프로그램은 가능한 짧아야합니다. 홀수 양의 정수 n( n >= 1및 n % 2 == 1)가 주어지면 시뮬레이션을 …

6
ASCII 다이를 롤
이 코드 골프 챌린지에서는 무작위 다이 롤의 아스키 아트를 출력해야합니다. 이처럼 : ________ /\ \ / \ 6 \ { 4 }-------} \ / 5 / \/_______/ 점에 유의하시기 바랍니다: ________ /\ \ / \ 3 \ { 4 }-------} \ / 5 / \/_______/ 이는 다이에서 가능한 결과가 아니기 …

10
떨어지는 볼 맵 만들기
소개 전에이 게임에 대해 들어 본 적이없는 사람들을 위해. 당신은 가능한 한 오래 생존 해야하는 공을 재생합니다. 이것은 왼쪽 또는 오른쪽으로 이동하여 구멍으로 이동하여 수행됩니다. 지도가 위쪽으로 이동하므로 더 오래 생존하려면 아래쪽으로 이동해야합니다. 이미지 를 검색 하면 내가 의미하는 게임을 알고있을 것입니다. 작업 양의 정수 n이 주어지면 n 레이어 의 …

20
숫자를 분해하십시오!
당신의 임무는 아래 형식을 사용하여 숫자를 분해하는 것입니다. 이것은 기본 변환과 유사, 대신을 나열하는 것을 제외시켰다 digits기본에, 당신은 목록 values목록 입력까지 추가하도록. 주어진베이스 인 경우 n, 다음 목록의 각 수의 형식이어야합니다 k*(n**m), 0<=k<n그리고 m목록에서 고유합니다. 명세서 합리적인 입 / 출력 형식 프로그램 / 기능은 2 개의 입력을 받아서 목록을 출력합니다. …
16 code-golf  number  sequence  number-theory  base-conversion  code-golf  bitwise  hashing  code-golf  string  ascii-art  whitespace  code-golf  math  code-golf  code-golf  image-processing  counting  code-golf  math  arithmetic  checksum  code-golf  code-golf  math  arithmetic  number-theory  code-golf  array-manipulation  random  code-golf  string  code-golf  math  ascii-art  base-conversion  code-golf  graphical-output  geometry  3d  code-golf  math  linear-algebra  matrix  code-golf  math  number  sequence  code-golf  array-manipulation  code-golf  math  matrix  linear-algebra  code-golf  number  sequence  counting  code-golf  string  code-golf  string  restricted-source  quine  sorting  code-golf  string  geometry  code-golf  string  code-golf  networking  code-golf  base-conversion  code-golf  math  matrix  code-golf  arithmetic  linear-algebra  matrix  code-golf  number  arithmetic  grid  code-golf  number  source-layout  code-golf  string  bitwise  checksum  code-golf  array-manipulation  code-golf  string  probability-theory  code-golf  tips  code-golf  sequence  code-golf  string  math  sequence  calculus  code-golf  string  palindrome  bioinformatics  code-golf  math  combinatorics  counting  permutations  code-golf  parsing  logic-gates  code-golf  arithmetic  number-theory  combinatorics  code-golf  math  sequence  polynomials  integer  code-golf  string  ascii-art  chess  code-golf  string  code-golf  number  code-golf  string  ascii-art  parsing  code-golf  code-golf  number  natural-language  conversion  code-golf  arithmetic  code-golf  string  code-golf  ascii-art  decision-problem 

14
지도에서 지정된 사각형 외부에 임의의 점을 생성
소개 경기장의 시각화는 다음과 같습니다. (0,0) +----------------------+(map_width, 0) | A | |-----+-----------+----| | D | W | B | |-----+-----------+----| | C | +----------------------+(map_width, map_height) (0, map_height) 게임이 진행되는 전체지도는 모서리 좌표가 (0,0) 및 (map_width, map_height) 인 사각형입니다. 적을 스폰 할 수있는 점수는 Union S=⋃(A,B,C,D)S=⋃(A,B,C,D)S = \bigcup (A, B, C, …
15 code-golf  random  game 

11
대안 적 아리아를 자동으로 예측 방지
제목에 대한 @ComradeSparklePony에게 감사합니다. 이 도전은 매우 간단해야합니다. 세 가지 목록이 제공됩니다. 첫 번째는 제목의 경우 이름 목록입니다. 두 번째는 소문자의 형용사 목록입니다. 세 번째는 소문자로 된 명사 목록입니다. 이름, 선택적 형용사, 명사 및 출력을 임의로 선택하십시오 <Name>'s <adjective> <noun>. 그러나 각 단어는 같은 문자로 시작해야합니다. 모든 단어가 문자로 시작한다고 …
15 code-golf  random 

6
발음 할 수있는 넌센스 단어 음절을 길게 생성
당신의 임무는 지정된 수의 '음절'로 합리적으로 발음 할 수있는 넌센스 단어를 생성하는 것입니다. 프로그램이 실행될 때마다 다른 의미없는 단어가 발생할 수 있습니다. 발음 성 발음하기 쉬운 단어는 음절로 구성되며, 두 음절 그룹 사이에 삽입 된 모음 그룹으로 구성됩니다. 모든 소리가 모든 위치에서 발음되는 것은 아니며 언어에 따라 다르므로 영어 사용자가 …

7
진동 평등
on [l, r]에서 시작하여 시간 단위당 하나의 단위 속도로 두 개의 정수 포인트 사이에서 진동하는 객체가 있습니다. 당신은 가정 할 수 있습니다 . 예를 들어 객체가 진동 하면 다음과 같은 결과가 나타납니다.lt=0l < r[3, 6] t=0 -> 3 t=1 -> 4 t=2 -> 5 t=3 -> 6 t=4 -> 5 …
15 code-golf  array-manipulation  decision-problem  code-golf  math  number-theory  palindrome  integer-partitions  code-golf  math  decision-problem  geometry  code-golf  string  random  code-golf  ascii-art  code-golf  kolmogorov-complexity  primes  code-golf  kolmogorov-complexity  code-golf  graphical-output  code-golf  number-theory  primes  integer  factoring  code-golf  sequence  array-manipulation  integer  code-golf  array-manipulation  matrix  code-golf  sequence  binary  code-golf  game  cellular-automata  game-of-life  binary-matrix  code-golf  string  ascii-art  code-golf  random  generation  logic  code-golf  string  code-golf  code-golf  sequence  array-manipulation  random  apl  code-golf  code-golf  sequence  primes  code-golf  math  sequence  integer  code-golf  number  arithmetic  array-manipulation  decision-problem  code-golf  ascii-art  number  code-golf  restricted-source  quine  code-golf  chess  board-game  code-golf  math  sequence  code-golf  number  sequence  kolmogorov-complexity  code-golf  number  sequence  arithmetic  code-golf  math  number  alphabet  code-golf  ascii-art  classification  statistics  apl  code-golf  array-manipulation  matrix  code-golf  string  kolmogorov-complexity  code-golf  sequence  binary  base-conversion  binary-matrix  code-golf  string  classification  code-golf  tips  python  code-golf  combinatorics  binary  subsequence  restricted-time  code-golf  number  number-theory  code-golf  math  number  complex-numbers  code-golf  string  code-golf  string  code-golf  string  random  game  king-of-the-hill  python  code-golf  number  sequence  code-golf  number  sequence  code-golf  code-golf  math  number  array-manipulation  code-golf  array-manipulation  decision-problem  code-golf  string  code-golf  sequence  integer 

14
프랑켄슈타인의 괴물의 이름
소개: 거의 할로윈이기 때문에 할로윈 테마의 무작위 과제를 생각하고있었습니다. 결국 나는 Frankenstein의 wikipedia 페이지를 읽고 있었고 다음과 같은 텍스트를 보았습니다. 생물 프랑켄슈타인이 그의 창조를 거부 한 것의 일부는 그가 이름을 밝히지 않아서 정체성이 결여된다는 사실이다. 대신 "wretch", "monster", "creature", "demon", "devil", "fiend"및 "it"와 같은 단어로 표시됩니다. 프랑켄슈타인은 10 장에서 그 …

30
앵무새 프로그램 만들기
입력이 주어지면 그 입력 다음에 줄 바꿈이 끝없이 출력됩니다. 입력은 인쇄 가능한 ASCII 문자 ( 0x20-0x7E)와 줄 바꿈 ( 0x0A) 만으로 구성된 문자열 입니다. 입력이 길이 0이면 끝없이 줄 바꿈을 출력합니다. 이것은 코드 골프 이므로 각 언어에서 가장 적은 바이트 가 이깁니다!
15 code-golf  string  sequence  combinatorics  fastest-code  number  code-challenge  restricted-source  rosetta-stone  code-golf  arithmetic  decision-problem  integer  factorial  code-golf  arithmetic  decision-problem  integer  bitwise  code-golf  kolmogorov-complexity  code-golf  tips  vim  code-golf  quine  code-generation  code-golf  string  restricted-source  code-golf  string  random  unicode  code-golf  audio  code-golf  ascii-art  code-golf  decision-problem  code-golf  puzzle-solver  code-golf  restricted-source  code-golf  kolmogorov-complexity  permutations  hexagonal-grid  code-golf  string  math  combinatorics  fastest-code  code-golf  restricted-source  code-golf  string  code-golf  arithmetic  code-golf  math  number  code-golf  string  decision-problem  balanced-string  code-golf  binary  code-golf  string  number  code-challenge  restricted-source  code-golf  ascii-art  printable-ascii  interactive  code-golf  string  ascii-art  code-challenge  restricted-source  source-layout  code-golf  arithmetic  tips  functional-programming  golfing-language  code-golf  binary  encryption 

당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.