«polyglot» 태그된 질문

여러 프로그래밍 언어로 실행되는 코드 관련 문제.

2
가장 많은 언어로 어떤 코드가 컴파일됩니까? [닫은]
간단한 프로그램을 제외하고 어떤 코드가 가장 많은 언어로 컴파일됩니까? ( "사소한"이란 빈 프로그램이나 직접 반향되는 텍스트와 같은 답변을 제외한다는 의미입니다.) 다음 코드는 C, C ++, Perl, TeX, LaTeX, PostScript, sh, bash, zsh 및 Prolog와 같은 프로그래밍 언어로 컴파일됩니다 (각각 다른 언어로 인쇄). %:/*:if 0;"true" +s ||true<</;#|+q|*/include<stdio.h>/*\_/ {\if(%)}newpath/Times-Roman findfont 20 scalefont …

30
'abc'와 'cba'
당신의 작업은 간단합니다. 한 언어로 'abc'실행될 때 문자열 만 출력 하고 다른 언어로 실행될 때 문자열 만 출력하는 단일 코드 스 니펫을 작성하십시오 'cba'. 프로그램은 입력하지 않아야합니다. 이것은 코드 골프 도전입니다.

6
C / C ++ Polyglot 작성
이 도전의 개념은 매우 간단합니다. 유효한 C와 유효한 C ++로 컴파일 할 프로그램을 작성하기 만하면됩니다! 글쎄, 몇 가지 캐치가 있습니다. 프로그램은 각 언어로 컴파일 될 때 다르게 작동해야합니다. "다르게 동작하는"것으로 간주 되려면 프로그램마다 언어마다 다른 출력이 있어야합니다. 규칙 프로그램은 유효한 C 및 C ++ 여야합니다. 프로그램은 컴파일 된 언어에 따라 …

9
GCD / LCM 폴리 글 로트!
과제는 한 언어로 입력 의 GCD 를 출력하고 다른 언어로 입력의 LCM 을 출력하는 프로그램 또는 기능을 만드는 것입니다. GCD 또는 LCM을위한 내장 (Mathematica를보고 있습니다)은 허용되지만 권장되지는 않습니다. 2 개의 입력이 있으며 항상 양의 정수이며 1000보다 크지 않습니다. 테스트 사례 각 줄은 다음과 같은 형식으로 하나의 테스트 사례입니다 x y …

10
404-고유 404 페이지를 찾을 수 없음
Stack Overflow 404 페이지 의 폴리 글로 에서 영감을 얻었습니다 . 골 목표는 간단합니다. 숫자 404 를 출력하는 폴리 글롯을 만든 다음 가능한 한 많은 언어로 종료합니다. 제한 사항 여기에 비틀기가 있습니다. 더 어렵게 만드는 데 제한이 있습니다. N 개의 프로그램 을 작성 하고 특정 순서로 N 개의 언어를 선택 …

30
이 코드는 * this *와 * that *에서 오류가 발생합니다. 실제로 작성 되었습니까?
에서 영감을 당신이 찾고있는 언어 아니에요! 도전 두 가지 다른 프로그래밍 언어를 선택하고 다음 줄을 stdout (또는 이와 동등한 것)으로 인쇄하는 프로그램을 작성하십시오. This program errors out in <the current language> :P 두 언어 각각에서 다른 종류의 오류를 생성합니다. 규칙 일부 규칙은 원래 도전에서 가져옵니다. 출력에서 언어 이름은 정확히 다음과 …

2
회문-폴리 글롯-퀸을 쓰십시오
A는 프로그램 :는 "palipolyquine"쓰기 quine 하는 수개 국어 및 회문을 . 규칙 : 코드 크기보다 폴리 글 로트 언어의 수가 더 좋습니다. 동점 일 경우 가장 짧은 답변 (바이트)이 이깁니다. Polyglot 및 Quine 규칙은 다음을 참조하십시오 : Polyquine 작성 . 내 예 ( 테스트 가있는 저장소 Freaky-Sources 가 있습니다) : …

27
한 달에 몇 일입니까?
한 달의 텍스트 표현 (대소 문자를 구분하지 않는 전체 이름 또는 3 자 약어)이 주어진 경우 해당 월의 일 수를 반환합니다. 예를 들어 december, DEC및 dec모든 31를 반환해야합니다. 2 월은 28 일 또는 29 일입니다. 입력이 올바른 형식 중 하나로 한 달이라고 가정하십시오.

6
비상 수 OEIS 폴리 글 로트!
면책 조항 : 이것은 "OEIS 폴리 글롯!"에서 많은 영감을 얻었습니다 . 폐쇄로 이어지는 문제를 해결하고 (출력 섹션 참조) 응답을 무효화하지 않도록 다시 게시되었습니다. 소개 우리 모두 는 정수 시퀀스 ( OEIS ) 의 온라인 백과 사전을 알고 사랑합니다 . 우리가 만든 어떤 경우에 따라서 오프라인 흥미로운 시퀀스의 버전? 글쎄, 그것은 …

7
가짜 제수 합 폴리 글 로트
작업 이 도전 해당 태스크는 프로그래밍 언어로 프로그램을 작성하는 L 은 양의 정수를 취 N , 그리고 적절한 약수의 합 출력 N ( 시퀀스 A001065 OEIS 온). 1 ≤ n ≤ 10 000에 대해 올바른 출력을 반환해야합니다 . 처음 10 개의 출력은 다음과 같습니다. 0, 1, 1, 3, 1, 6, …

10
자연 로그에 개미
이것은 좋은 초보자 도전과 좋은 시간 킬러입니다. 제목이 너무 짧아서-자연-로그 만 말했는데, 이것은 로그와 관련이 없습니다. 주어진 2 개의 변수 : 개미의 수 n. 로그의 너비입니다 w. 출력 너비의 로그 w와 n개미 (도시 예 w=3, n=6) | | | \O/ \O/ \O/ | | -O- -O- -O- | | /o\ …

15
날 따라와!
문자열을 인수로 지정하면 가장 긴 겹치지 않는 반복 하위 문자열의 길이를 출력하거나 해당 문자열이 없으면 0을 출력하십시오. 입력 문자열이 비어 있지 않다고 가정 할 수 있습니다. 예 abcdefabc: 부분 문자열 abc은 위치 1과 7에서 반복되므로 프로그램은 3 을 출력해야합니다. abcabcabcabcab: abcabc또는 bcabca또는 cabcab반복되므로 프로그램에서 출력해야합니다 6 . (하위 문자열 abcabcabcab도 …
23 code-golf  string  code-golf  code-golf  kolmogorov-complexity  primes  code-golf  kolmogorov-complexity  hexadecimal  code-golf  code-golf  string  code-golf  string  random  code-golf  array-manipulation  code-golf  ascii-art  kolmogorov-complexity  random  code-golf  array-manipulation  code-golf  stateful  code-golf  hello-world  code-golf  string  code-golf  interpreter  lisp  code-golf  restricted-source  quine  palindrome  code-golf  ascii-art  random  generation  challenge-writing  ascii-art  random  polyglot  maze  answer-chaining  string  cops-and-robbers  whitespace  code-golf  string  cops-and-robbers  whitespace  code-golf  number  sequence  code-golf  date  code-golf  ascii-art  decision-problem  code-golf  combinatorics  chemistry  code-golf  kolmogorov-complexity  source-layout  radiation-hardening  code-golf  ascii-art  path-finding  maze  code-golf  string  ascii-art  game  animation  code-golf  string  ascii-art  code-golf  ascii-art  kolmogorov-complexity  code-golf  restricted-source  new-years 

24
ogl-edocf 도전
입력 범위의 ASCII 문자로 구성된 비어 있지 않은 섞인 문자열 입니다.[ 32..126 ][32..126][32..126] 산출 입력 문자열에 연속적인 회전을 적용하여 출력을 얻습니다. [a-zA-Z]입력 문자열의 각 문자 ( )에 대해 왼쪽에서 오른쪽으로 : 문자가 대문자 인 경우 모든 문자를 왼쪽으로 한 위치 씩 회전 문자가 소문자 인 경우 오른쪽 앞의 한 위치 …
22 code-golf  string  code-golf  string  code-golf  string  parsing  brainfuck  code-challenge  python  hello-world  error-message  code-golf  string  code-golf  number  integer  counting  subsequence  code-golf  string  cipher  code-golf  array-manipulation  arithmetic  integer  matrix  code-golf  math  sequence  code-golf  restricted-source  pi  popularity-contest  cops-and-robbers  polyglot  popularity-contest  cops-and-robbers  polyglot  code-golf  file-system  king-of-the-hill  code-golf  number  sequence  integer  rational-numbers  string  code-challenge  source-layout  code-golf  ascii-art  king-of-the-hill  code-golf  array-manipulation  sorting  code-golf  string  code-golf  restricted-source  source-layout  tips  math  code-challenge  permutations  logic-gates  code-golf  number  random  integer  code-golf  math  code-golf  math  number  decision-problem  king-of-the-hill  python  board-game  code-challenge  brainfuck  busy-beaver  code-golf  number  cops-and-robbers  polyglot  obfuscation  answer-chaining  code-golf  number  integer  conversion  code-golf  string  parsing  code-golf  ascii-art  number  king-of-the-hill  javascript  code-golf  source-layout  radiation-hardening  code-golf  array-manipulation  matrix  code-golf  string  graph-theory  code-golf  array-manipulation  decision-problem  code-golf  string  ascii-art  code-golf  string  code-golf  array-manipulation 

30
0이 아닌 고유 한 숫자로 임의의 n 자리 숫자를 얻습니다.
나는 이 질문을 읽고 그것이 좋은 도전이 될 것이라고 생각했다. 태스크 입력 0<n<10으로 임의의 숫자를 생성하십시오. 정확히 n 자리 첫 번째가 아닌 0 그래서 f(n)>10**(n-1)-1 고유 숫자 우승 기준 이것은 코드 골프 이므로 가장 짧은 코드가 승리합니다. 무작위 나는 균등하게 분포 된 것을 의미합니다. 따라서 프로그램의 관점에서 볼 때 각각의 …
22 code-golf  number  random  grid  game  king-of-the-hill  javascript  code-golf  arithmetic  statistics  code-golf  math  code-golf  math  code-golf  string  palindrome  code-golf  string  interactive  code-golf  quine  polyglot  code-golf  string  stack-exchange-api  code-golf  number-theory  decision-problem  code-golf  tips  code-golf  string  internet  code-golf  graphical-output  image-processing  fractal  code-golf  ascii-art  geometry  hexagonal-grid  code-golf  string  restricted-source  hello-world  code-golf  game  code-golf  cipher  code-golf  permutations  cops-and-robbers  permutations  cops-and-robbers  code-golf  internet  stack-exchange-api  code-golf  ascii-art  random  code-golf  tips  code-golf  ascii-art  code-golf  code-golf  kolmogorov-complexity  code-golf  string  unicode  code-golf  number  sequence  primes  palindrome  code-golf  game  decision-problem  code-golf  math  geometry  code-golf  graphical-output  interactive  code-golf  set-partitions  code-golf  number  arithmetic  restricted-source  code-golf  decision-problem  python  recursion  code-golf  ascii-art  code-golf  source-layout  code-golf  function  recursion  functional-programming  code-golf  game  combinatorics  permutations  code-golf  string  file-system  code-golf  string  hashing  code-golf  stack-exchange-api  code-golf  string  code-golf  math  number  arithmetic  polyglot 

7
폴리 글 로트 조각 인쇄
일반적으로 폴리 글 로트는 각 언어가 다른 언어에 대해 존재하는 코드의 일부를 문자열 리터럴로 묶거나 주석 구문 또는 기타 유사한 트릭을 사용하여 무시할 수있는 방식으로 구성됩니다. 각 언어의 출력이 해당 출력을 생성하는 폴리 글롯의 코드 인 폴리 글롯을 작성하는 것이 목표입니다. 특히, 출력은 삭제만으로 폴리 글롯 코드로 구성되어야하며 주어진 언어에서 …

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