Questions tagged «palindrome»

回文词是单词,词组,数字或时间的表示形式,它们的含义相反,例如“级别”,“ reviver”,“ 12321”,“ 10:01”。另请参见[balanced-string]标签。

6
N个碱基中的回文数
给定一个非负整数n >= 0,请永远输出x_i >= 3以完全n不同b的底数为回文数的整数序列,底数可以是2 <= b <= x_i-2。 这基本上是OEIS A126071的反函数,在此输出中该序列中的哪些索引具有值n。有点不同,因为我更改了它,所以您忽略了碱基b = x_i-1, x_i, x_i+1,因为这些碱基的结果始终是相同的(值始终是回文率,或者始终不是)。此外,偏移量也不同。 x_i限制为数字,>= 3因此每个结果的第一项n为A037183。 请注意,输出格式是灵活的,但是应该以很好的方式分隔数字。 例子: n seq 0 3 4 6 11 19 47 53 79 103 137 139 149 163 167 ... 1 5 7 8 9 12 13 14 22 23 25 29 35 …
10 code-golf  sequence  base-conversion  palindrome  code-golf  array-manipulation  matrix  code-golf  string  ascii-art  code-golf  ascii-art  physics  code-golf  number  sequence  fibonacci  code-golf  ascii-art  packing  code-golf  string  hexadecimal  code-challenge  restricted-source  decision-problem  binary  code-golf  code-golf  code-golf  stack-exchange-api  code-golf  string  parsing  generation  data-structures  code-golf  kolmogorov-complexity  graphical-output  code-golf  array-manipulation  integer  generation  data-structures  code-golf  number  random  probability-theory  king-of-the-hill  java  minesweeper  code-golf  string  kolmogorov-complexity  animation  code-golf  string  code-golf  code-golf  quine  code-golf  internet  code-golf  arithmetic  base-conversion 

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 最短的代码胜出! 排行榜 显示代码段 var QUESTION_ID=144816,OVERRIDE_USER=71625;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var …
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 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.