«arithmetic» 태그된 질문

초등학교 산술과 관련된 도전.

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 

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 

15
오일러 방법 구현
이 과제의 목표는 오일러 방법 을 사용 하여 f (n) (x) = c 형식의 미분 방정식의 해를 근사화하는 것입니다 . † 입력은 n 번째 값이 f (n) (0) 의 값을 나타내는 정수 목록입니다 . 첫 번째 정수는 f (0)이고 두 번째 정수는 f '(0)입니다. 이 목록의 마지막 정수는 상수이며 항상 …

11
순서 n까지 변수 그룹의 모든 조합 생성
사양 주어진 m변수는 순서대로 모든 조합을 만듭니다 n. 예를 들어 두 변수 ( a및 b)를 순서대로 매핑 한 결과는 다음 과 1같습니다. ㅏ 비 ab 두 변수 ( a및 b)를 순서대로 매핑 한 결과는 다음 과 2같습니다. ㅏ 2 비 b 2 ab 2 B ab 2 a 2 b …

2
가장 보편적 인 단어
이 질문은 "Thing Explainer" 가 읽기 쉽고 재미 있기 때문에 작성되었습니다 . 문자, 숫자 및 이와 같은 것을 읽고 가져 와서 모든 단어 가이 세트의 일부인 경우 "#%|?반환 True / 1하는 "컴퓨터가하는 일"을 작성하십시오 . 모든 단어가 해당 세트의 일부가 아닌 경우 해당 단어의 일부가 아닌 단어를 리턴하십시오. 이 웹 …
9 code-golf  string  parsing  code-golf  array-manipulation  random  permutations  code-golf  string  code-golf  parsing  code-golf  string  quine  code-golf  string  parsing  comment  code-golf  string  counting  natural-language  code-golf  string  decision-problem  code-golf  math  code-challenge  metagolf  test-battery  code-golf  string  code-golf  math  number  arithmetic  source-layout  code-golf  number  primes  decision-problem  code-golf  math  arithmetic  code-golf  date  code-golf  string  cryptography  code-golf  code-golf  chess  board-game  code-golf  geometry  grid  puzzle-solver  set-partitions  code-golf  number  natural-language  code-golf  ascii-art  code-golf  math  code-golf  string  ascii-art  kolmogorov-complexity  code-golf  string  natural-language  code-golf  game  board-game  tic-tac-toe  code-golf  ascii-art  hexagonal-grid  code-golf  string  comment  code-golf  internet  code-golf  sorting  code-golf  kolmogorov-complexity  unicode  code-golf  tips  code-golf  string  natural-language  code-golf  string  kolmogorov-complexity  source-layout  hello-world  code-golf  string  kolmogorov-complexity  counting  natural-language  code-golf  random  quine  code-golf  string  math  bitwise  code-golf  permutations  code-golf  string  code-golf  arithmetic 

7
세 케레스의 순서
정의 a(1) = 1 a(2) = 2 a(n)에서 k>a(n-1)3 항 산술 진행을 피하는 가장 작은 수 입니다 a(1), a(2), ..., a(n-1), k. 즉, a(n)가장 작은 숫자가 k>a(n-1)같은 존재하지 않는 x, y어디 0<x<y<n와 a(y)-a(x) = k-a(y). 해결 된 예 의 경우 n=5: 우리는 a(1), a(2), a(3), a(4) = 1, 2, 4, …

10
기존 가중치 세트에서 선택하여 목표 합계를 만듭니다.
역도를 할 때 여러 접시를 막대에 부착하여 특정 무게를 만들고 싶습니다. 다음과 같은 번호판이 있습니다. 1kg 6 장 각각 2.5kg 6 장 각 5kg 6 장 각각 10kg 6 장 바 자체의 무게는 10kg입니다. 플레이트는 한 쌍으로 만 부착 할 수 있습니다. 막대의 각 끝에 부착되어 있고 두 끝의 배치는 …

3
날짜 단순화
이것은 분수를 단순화하는 것과 비슷하지만 날짜가 있습니다! 프로그램의 입력은 형식이어야합니다 mm/dd 예를 들어, 3/4 //March 4 12/15 //December 15 1/1 // January 1 우리는 입력이 유효 할 것으로 가정합니다. January 31 February 28 March 31 April 30 May 31 June 30 July 31 August 31 September 30 October 31 November …

6
두 행렬의 크로네 커 합을 계산
아래의 예에서, A그리고 B2 바이 2 행렬들 수 있고, 행렬은 하나의 인덱스이다 것이다. 크로네 커의 제품은 다음과 같은 속성이 있습니다 : A⊗B = A(1,1)*B A(1,2)*B A(2,1)*B A(2,2)*B = A(1,1)*B(1,1) A(1,1)*B(1,2) A(1,2)*B(1,1) A(1,2)*B(1,2) A(1,1)*B(2,1) A(1,1)*B(2,2) A(1,2)*B(2,1) A(1,2)*B(2,2) A(2,1)*B(1,1) A(2,1)*B(1,2) A(2,2)*B(1,1) A(2,2)*B(1,2) A(2,2)*B(2,1) A(2,2)*B(1,2) A(2,2)*B(2,1) A(2,2)*B(2,2) 크로네 커의 합은 다음과 같은 속성이 …

3
출생 번호 확인
노르웨이 출생 번호는 11 자리 숫자로 구성되며 다음과 같이 구성됩니다. DDMMYYiiikk DD 오늘은 (01-31) MM 월입니다 (01-12) YY연도입니다 (00-99). 1900 년과 2000 년 사이에 구분되지 않습니다 iii "개별 번호"입니다 kk 두 자리수 iii 생년월일과 성별에 따라 다음과 같이 결정됩니다. 0000-1900 : 무시, 일부 불일치 및 특수 사례가 있음 1900-1999 : …

2
교대에서 수학적 표현 풀기
식의 교대로 나오는 요소를 사용하여 수학 식을 푸는 프로그램을 만듭니다. 그 방법은 왼쪽에서 오른쪽으로 읽는 대신 첫 번째 문자, 마지막, 두 번째, 두 번째에서 마지막 등을 읽는 것입니다. 그러면 평가하고 출력해야하는 새로운 표현이 제공됩니다. a*b/c+d-e 135798642 <-- Order you read the expression in ae*-bd/+c <-- Order of operation. 예: 1*3/2+4-5 …

6
크로네 커 기호 계산
here 및 here 관련 링크 가 있지만 여기에 짧은 버전이 있습니다. 두 개의 정수 입력 a과 b음의 무한대와 무한대 사이에 입력해야합니다 (필요한 경우 범위를 제한 할 수 있지만 함수는 여전히 음수 입력을 수락해야 함). 크로네 커 심볼의 정의 (a|b)입력 a과 b위치에 크로네 커 기호 를 반환해야합니다 (a|b) = (a|p_1)^e_1 * …

2
유전 적 기초 변화
배경 이 문제에서 정수 의 기본 b표현 은 의 거듭 제곱의 n표현 n으로 b, 각 항은 최대 b-1횟수로 발생합니다 . 예를 들어, 기본 4표현 2015은 4^5 + 3*4^4 + 3*4^3 + 4^2 + 3*4 + 3 이제, 유전 적 기본 b표현은 n지수를 기본 b표현으로 변환 한 다음 지수를 재귀 적으로 …

15
변환하지 않고 문자열의 합
int로 변환하거나 숫자 데이터 유형을 사용 하지 않고 2 개의 문자열 입력을 가져 와서이 두 문자열의 합계를 출력해야 합니다. 전의. string one = "123"; string two = "456"; string sum = "579"; 문자열이 10 자리보다 크지 않다고 가정하십시오. 이것은 코드 골프이며 문자가 가장 짧은 답변입니다. C #의 답변을 편집하면 나를 …
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.