«math» 태그된 질문

과제는 수학과 관련이 있습니다. [number] [number-theory] [arithmetic] [combinatorics] [graph-theory] [geometry] [abstract-algebra]와 같이보다 구체적인 태그를 사용하는 것도 고려하십시오.

20
동전 던지기의 절반만큼 머리를 얻을 확률을 계산하십시오.
표준 입력에서 작은 양의 짝수 정수를 제공하면 많은 동전을 뒤집 으면 머리의 절반이 될 확률을 계산하는 프로그램을 작성하십시오. 예를 들어, 2 개의 동전이 주어지면 가능한 결과는 다음과 같습니다. HH HT TH TT 여기서 H와 T는 머리와 꼬리입니다. 코인 수의 절반에 해당하는 2 개의 결과 ( HT및 TH)가 있습니다. 총 4 …

2
비행기
블로우 업 대수 기하학에서 강력한 도구입니다. 그것은 나머지 구조를 보존하면서 대수 세트 에서 특이점 을 제거 할 수 있습니다 . 걱정하지 않는 것에 익숙하지 않으면 실제 계산을 이해하기 어렵지 않습니다 (아래 참조). 다음에서 우리는 포인트 의 폭파를 고려하고 있습니다.(0 , 0 )(0,0)(0,0)2D에서 대수 곡선의 2D의 대수 곡선은 두 변수에서 다항식의 …

15
복잡한 힘을 계산
런 다운 입력 x 와 y가 주어지면 복잡한 연산을 수행하고 해당 결과를 인쇄하십시오. 프로그램 작동 방식 z = x + yi 형식 의 입력 x 및 y 가 주어지면 z i-z를 찾으십시오. z i-z 의 절대 실수 값이 절대 허수 부분보다 크면 실수 부분을 인쇄하십시오. 반대의 경우도 마찬가지입니다. 두 값이 …

17
두 목록의 교차점을 설정
목표는 두 정수 목록의 교집합을 계산하는 것입니다. 교집합은 두 입력 목록에서 한 번 이상 발견 된 순서가없는 고유 한 정수 그룹으로 정의됩니다. 입력 입력은 원하는 형식 (함수 매개 변수, stdio 등) 일 수 있으며 두 개의 정수 목록으로 구성됩니다. 음수가 아닌 정수를 포함 할 수있는 것 (즉, 정렬되지 않았거나 중복을 …

7
코드-골프 : 패 레이 시퀀스 (I)
도전 이 작업에서는 정수 N (10 ^ 5 미만)이 주어지고 순서 N 의 Farey 시퀀스 를 출력합니다 . 입력 N은 한 줄로 주어지며 입력은 EOF로 종료됩니다. 입력 4 3 1 2 산출 F4 = {0/1, 1/4, 1/3, 1/2, 2/3, 3/4, 1/1} F3 = {0/1, 1/3, 1/2, 2/3, 1/1} F1 = …
10 code-golf  math  code-golf  math  code-golf  number  number-theory  code-golf  math  arithmetic  repeated-transformation  code-golf  geometry  popularity-contest  code-golf  code-golf  tips  haskell  math  fastest-algorithm  code-golf  combinatorics  code-golf  math  polynomials  rational-numbers  code-golf  code-golf  popularity-contest  javascript  code-golf  kolmogorov-complexity  code-golf  code-golf  math  combinatorics  permutations  code-challenge  restricted-source  random  array-manipulation  code-challenge  generation  code-golf  code-golf  ascii-art  arithmetic  division  code-challenge  number  code-golf  math  number  binary  code-golf  ascii-art  code-golf  interpreter  stack  code-golf  internet  networking  code-golf  math  code-golf  ascii-art  code-golf  math  sequence  code-golf  hello-world  restricted-source  code-golf  ascii-art  code-golf  geometry  code-golf  kolmogorov-complexity  pi  code-golf  math  combinatorics  permutations  code-golf  math  code-challenge  ascii-art  code-golf  string  code-golf  quine  code-golf  math  floating-point  golfscript  code-golf  string  code-golf  sliding-puzzle  code-challenge  arithmetic  code-golf  math  code-golf  geometry  optimized-output 

2
파우더 토이의 골프 팁
이것으로 재미있게, The Powder Toy 는 골프, 특히 filt Logic에서 흥미로운 도전입니다. TPT를 도전으로 만드는 것은 문제에 접근하는 많은 많은 방법입니다. Should I use Cellular Automaton rules, SWCH logic, Filt logic, subframe filt logic, and/or wall logic? 따라서 TPT 골프 팁을 얻을 수있는 위치가 도움이 될 것이므로이 질문 스레드를 만들었습니다. …
9 code-golf  tips  the-powder-toy  code-golf  number  array-manipulation  integer  code-golf  string  decision-problem  boggle  code-golf  array-manipulation  average  code-golf  math  code-golf  decision-problem  restricted-source  code-golf  code-golf  math  primes  code-golf  random  code-golf  tips  perl  code-golf  string  parsing  code-golf  math  number  decision-problem  code-golf  math  number  code-golf  string  alphabet  code-golf  math  geometry  code-golf  interpreter  brainfuck  code-golf  code-golf  decision-problem  boggle  code-golf  math  number  sequence  code-golf  math  code-golf  ascii-art  code-challenge  restricted-source  quine  code-golf  math  decision-problem  number-theory  primes  code-golf  ascii-art  code-golf  integer  graph-theory  chess  code-golf  math  interpreter  code-golf  code-golf  code-golf  ascii-art  code-golf  arithmetic  number-theory  code-golf  string  kolmogorov-complexity  code-golf  string  decision-problem  code-golf  primes  factoring  encode  code-golf  decision-problem  code-golf  geometry  grid  code-golf  quine  code-golf  matrix  code-golf  matrix  code-golf  code-golf  number  array-manipulation  code-golf  array-manipulation  sorting  code-golf  matrix  code-golf  brain-flak 

1
근무 시간 계산기
이것은 회사가 모든 직원의 근무 시간 모니터링을 처리하는 방식을 기반으로합니다. 우리 각자는 센서 앞에 카드를 전달할 수 있으므로 시계는 직원이 사무실을 체크인 또는 체크 아웃하는 시간을 등록합니다. 레지스터가 코드에 연결될 때마다 : 코드 0 : 직원이 사무실에 도착하거나 사무실로 돌아옵니다. 코드 1 : 직원이 점심 식사를 위해 퇴근합니다. 코드 2 …

7
열차가 라벨이있는 다리를 건너
양의 정수의 숫자로 연결된 타일로 형성된 길이 B 의 브리지를 고려하십시오 . 예를 들어, B 가 41 인 경우 다음과 같습니다. ----------------------------------------- 12345678910111213141516171819202122232425 이제 다리를 건너는 길이 T 의 기차를 상상해보십시오 . 열차의 가장 왼쪽 지점은 X 위치 (1 인덱스) 에서 시작합니다 . 문제를 더 잘 이해하려면 B = 41, …

17
소인수 분해의 소인
나는 PPCG에서 또 다른 주요 도전이 오는 것을 보았고 , 나는 소수를 좋아합니다. 그런 다음 소개 텍스트를 잘못 읽고 창의적 두뇌가 무엇을 생각하는지 궁금했습니다. 제기 된 질문은 사소한 것으로 판명되었지만, 내가 읽은 질문에 대해서도 같은지 궁금합니다. 6은 2 ^ 1 * 3 ^ 1로 나타낼 수 있고 50은 2 ^ …

7
유사 프라임 골프!
소개 / 배경 A의 최근 논의 에서 크립토 채팅 I가와 / 도움을 논의하기 위해 도전했다 페르마 소수도 테스트 와 카 마이 클 번호. 이 테스트는 a^(p-1) mod p==1항상 소수 p에 대해서는 적용되지만 항상 복합 소수 에는 적용되지 않는 전제를 기반으로합니다 . 이제 카 마이클 숫자는 본질적으로 Fermat의 테스트 최악의 적입니다 …
9 code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

13
비교 체인 확장
대부분의 언어와는 달리, 파이썬은 평가 a<b<c부울 비교에 반대가 실제로 세 개의 숫자를 비교, 수학에서 할 것처럼 a<b로를 c. 이것을 C (및 다른 많은 것)로 쓰는 올바른 방법은입니다 a<b && b<c. 이 도전에서, 당신의 임무는 파이썬 / 직관적 인 표현에서 다른 언어로 쓰여지는 방법으로 임의 길이의 비교 체인을 확장하는 것입니다. 명세서 …
9 code-golf  parsing  conversion  syntax  code-golf  sequence  primes  code-challenge  geometry  optimization  code-golf  graph-theory  code-golf  number-theory  primes  integer  code-golf  source-layout  cops-and-robbers  code-golf  source-layout  cops-and-robbers  code-golf  sequence  primes  integer  code-golf  math  number-theory  primes  rational-numbers  code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

3
n 자리 정밀도를 가진 대략적인 부동 소수점 수
우리는 r0과 1 사이 의 부동 소수점 숫자 와 integer p입니다. r최소 p자릿수 이상의 근사값을 가진 가장 작은 분모를 가진 정수의 분수를 찾으십시오 . 입력 : r(부동 소수점 수) 및 p(정수). 출력 : a및 b정수 a/b(float)는 숫자 r까지 근사값 p입니다. b 가능한 양의 정수가 가장 작습니다. 예를 들면 다음과 같습니다. …

30
int 입력 n이 주어지면 n * reversed (n)을 출력하십시오.
정수가 주어지면 n출력하십시오.n * reversed(n) reversed(n)reverse의 자릿수 일 때 얻는 숫자입니다 n. reverse(512) = 215 reverse(1) = 1 reverse(101) = 101 >>>>>>>> func(5) = 5*5 = 25 func(12) = 12*21 = 252 func(11) = 11*11 = 121 func(659) = 659*956 = 630004 최단 코드 승리! 리더 보드 코드 스 니펫 …
9 code-golf  math  arithmetic  code-golf  math  integer  code-golf  arithmetic  integer  code-golf  sequence  base-conversion  palindrome  code-golf  math  primes  integer  code-golf  parsing  conversion  syntax  code-golf  sequence  primes  code-challenge  geometry  optimization  code-golf  graph-theory  code-golf  number-theory  primes  integer  code-golf  source-layout  cops-and-robbers  code-golf  source-layout  cops-and-robbers  code-golf  sequence  primes  integer  code-golf  math  number-theory  primes  rational-numbers  code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

5
타원 시스템
소개 평면에 5 개의 점이 주어지면이 점을 통과하는 타원의 면적을 계산해야합니다. 주어진 입력 값으로 정확히 하나의 축퇴하지 않은 타원을 구성 할 수 있다고 가정 할 수 있습니다. 규칙 입력되고 10, 임의의 편리한 형태로 정수에 대응 x하고 y점의 좌표. 예를 들어, 10정수 목록 [x1, y1, x2, y2, ..., x5, y5]또는으로 입력을 …

3
두 개의 얽힌 체인
에서 이 질문 나는 함수와는 "체인"기능을 정의 : 는 순열입니다. 즉, 모든 값이 정확히 하나의 값으로 매핑되고 매핑됩니다. 기능 또는 그 역의 반복 된 적용에 의해 임의의 다른 값으로부터 임의의 값을 얻을 수있게한다. 이 작업을 수행하는 많은 기능이 있으며 그중 일부는 매우 간단합니다 (해당 질문에 대한 답변 참조). 이제 "interwoven"함수라고하는 …

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