タグ付けされた質問 「primes」

素数の特定と操作に関する課題

2
パウダートイでのゴルフのヒント
これを楽しんでください。パウダートイは、特にフィルトロジックに関して、ゴルフにとって興味深い挑戦です。 TPTが課題となるのは、問題に取り組むための多くの方法です。 Should I use Cellular Automaton rules, SWCH logic, Filt logic, subframe filt logic, and/or wall logic? そのため、TPTゴルフのヒントの場所は非常に役立つので、この質問のスレッドを作成しました。 このスレッドは、多くの略語を使用する可能性があります。それらの多くはゲーム内の要素になるため、Wikiでそれらを検索すると、それらが何であるかなど、それらに関する多くの情報が表示されます。 以下は、このスレッドに表示される可能性が最も高いもので、検索に行きたくない人のために、ゲーム内の説明(およびフルネーム)が添付されています。 SPRK:電気。TPTのすべての電子機器の基礎は、ワイヤーおよびその他の導電性要素に沿って移動します。 FILT:フィルター。フォトンをフィルターし、色を変更します。 ARAY:レイエミッター。レイは、衝突したときにポイントを作成します。 BTRY:バッテリー。無限の電力を生成します。 DRAY:複製光線。その前にあるパーティクルのラインを複製します。 CRAY:パーティクルレイエミッタ。tmpによって設定された範囲で、ctypeによって設定されたパーティクルのビームを作成します。 SWCH:スイッチ。スイッチを入れたときにのみ導通します。(PSCNはオン、NSCNはオフ) すべての要素のリスト
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 


17
素因数分解における素数
PPCGで別のプライムチャレンジが行われるのを見ました。いくつかのプライムが大好きです。それから私は紹介文を読み間違えて、ここで創造的な頭脳が何を思いついたのか疑問に思いました。 提起された質問は取るに足らないものだったことがわかりますが、私が読んだ(誤った)質問についても同じことが言えるのでしょうか。 6は2 ^ 1 * 3 ^ 1で表すことができ、50は2 ^ 1 * 5 ^ 2で表すことができます(^は指数を示します)。 あなたのタスク: プログラムまたは関数を記述して、この数の表現にいくつの異なる素数があるかを判別します。 入力: 1 <n <10 ^ 12の整数n。通常の方法で取得されます。 出力: nの一意の素因数を表すために必要な個別の素数の数。 テストケース: Input Factorisation Unique primes in factorisation representation 24 2^3*3^1 2 (2, 3) 126 2^1*3^2*7^1 3 (2, 3, 7) 8 2^3 2 (2, 3) 64 …

7
pseudoprimesをゴルフしましょう!
はじめに/背景 で、最近の議論で暗号チャット私は議論するために/のヘルプ挑戦されたフェルマー素数判定テストとカーマイケル数を。このテストは、a^(p-1) mod p==1常に素数に当てはまるがp、常にコンポジットには当てはまらないという前提に基づいています。カーマイケル番号は、基本的にはフェルマートのテストで最悪の敵です。取得するために同時に素数にならないように選択aする必要がある番号です。が共素数でない場合、本質的には、自明ではない因子を見つけましたpa^(p-1) mod p!=1apそして、誰もが知っているように、因数分解は非常に難しい場合があります。特に、すべての要素が十分に大きい場合。これで、Fermatテストが実際にはあまり使用されない理由がよくわかります(より優れたアルゴリズムがあります)。これは、(セキュリティの観点から)防御者としてのあなたが同じような量の作業を行わなければならない数があるためです。攻撃者(つまり、数を因数分解します)。 これらの数値が魅力的である理由がわかったので、可能な限り最短の方法で数値を生成します。必要に応じて、生成したコードを記憶することができます。 カーマイケル番号は、OEISではA002997としても知られています。関連する課題はすでに ありますが、サイズではなく速度が最適化されているため、ここからのエントリは競争力がありません。同じ議論が逆の方向にも当てはまり、ここのエントリはサイズを優先して速度とトレードオフをする可能性があります。 仕様 入力 これは標準のシーケンスチャレンジなので、正または負でない整数nを入力として使用します。n必要に応じて、0または1のインデックスを付けることができます(指定してください)。 出力 出力は、必要にn応じて、-番目のカーマイケル番号または最初のnカーマイケル番号のいずれかになります(指示してください)。 仕様 整数xは、xが複合である場合にのみカーマイケル数であり、のすべての整数yについてgcd(x,y)=1、それを保持しy^(x-1) mod x==1ます。 誰が勝ちますか? これはcode-golfなので、バイトで最短のコードが優先されます!標準のIOと抜け穴のルールが適用されます。 テストケース 最初のいくつかのカーマイケル番号は次のとおりです。 561,1105,1729,2465,2821,6601,8911,10585,15841, 29341,41041,46657,52633,62745,63973,75361,101101, 115921,126217,162401,172081,188461,252601,278545, 294409,314821,334153,340561,399001,410041,449065, 488881,512461
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
比較チェーンを拡張
ほとんどの言語と異なり、Python a<b<cは数学で行われるように評価し、ブール値a<bをと比較するのではなく、実際には3つの数値を比較しcます。これをC(および他の多くの)で記述する正しい方法は、a<b && b<c。 この課題の課題は、このような任意の長さの比較チェーンをPython /直感的な表現から他の言語でどのように記述するかまで拡張することです。 仕様書 プログラムは演算子を処理する必要があります。 ==, !=, <, >, <=, >=。 入力には、整数のみを使用した比較チェーンがあります。 途中の比較の真実性について心配する必要はありません。これは、純粋に構文解析/構文上の課題です。 入力には、スペースで分割することで解析を簡単にする回答を防ぐための空白はありません。 ただし、出力には、&&' のみ、または比較演算子と&&'の両方のいずれか、または両方を囲む単一のスペースがある場合がありますが、一貫性があります。 テストケース Input Output --------------------------------------------------------------- 3<4<5 3<4 && 4<5 3<4<5<6<7<8<9 3<4 && 4<5 && 5<6 && 6<7 && 7<8 && 8<9 3<5==6<19 3<5 && 5==6 && 6<19 10>=5<7!=20 10>=5 && 5<7 && …
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 最短のコードが勝ちます! リーダーボード コードスニペットを表示 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 

5
Goldbachパーティションの増加
ゴールドバッハの予想は次のように述べている。 2より大きいすべての偶数は、2つの素数の合計です。 私たちは、数のゴールドバッハのパーティションを検討するn個に追加する2つの素数のペアであることを、N。ゴールドバッハのパーティションが増加していることを懸念しています。数値のゴールドバッハパーティションのサイズは、その数値のすべてのパーティションの最小素数のサイズで測定します。このサイズがすべての小さい偶数のサイズよりも大きい場合、数値はパーティションの増加です。 仕事 n> 2の偶数の整数を指定して、nがGoldbachパーティションの増加であるかどうかを判別し、2つの一意の値を出力します。 これはcode-golfなので、ソースコードのバイト数を最小限に抑えることを目指してください。 OEIS A025018

1
負のXOR素数
約1年前、XOR素数を見つけるように求められました。これらは、基数2でXOR乗算を実行するときの唯一の因子が1である数値とそれ自体です。今は少し物事を盛り上げるつもりでした。 XOR素数をベース-2で見つけます。 Base -2への変換 ベース-2は他のすべてのベースとよく似ています。左端の場所は1の場所(1 =(-2)0)であり、その隣に-2の場所(-2 =(-2)1)があり、その隣に4の場所(4 =(-2 )2)など。大きな違いは、負の数は負の符号なしでbase -2で表すことができることです。 変換の例をいくつか示します。 Decimal | Base -2 ----------------- 6 | 11010 -7 | 1001 12 | 11100 -15 | 110001 Base -2でのXOR追加 Base -2でのXOR追加は、バイナリでのXOR追加とほとんど同じです。単に数値をBase -2に変換し、各桁のXORをXORします。(これはキャリーなしの加算と同じです) 以下は、ステップバイステップの例です。 (記号+'を使用して、Base -2 XOR加算を示します) ベース10から開始: 6 +' -19 基数-2に変換: 11010 +' 10111 持ち運びせずに追加: 11010 +' 10111 --------- …

2
1000の最も一般的な単語
この質問は、「物事の説明者」が楽しく読めるから書いてありました。 文字、数字、およびこのようなもののセットを読み取り/受け取り、すべての単語がこのセットの一部である場合に"#%|?戻る「コンピュータに物事を実行させるもの」を記述します。True / 1 すべての単語がそのセットの一部ではない場合、そのセットの一部ではなかった単語を返します。 このウェブサイトは、すべての場合において正しいと見なすことができます。ルールはそのサイトの仕様に従うように書かれています。 例: Truthy: 最初の水平線より上のテキスト全体が入力として貼り付けられている場合、コードは真の値を返す必要があります。 次の行は真の値を返します(入力はで区切られています###) This returns "Hello, World!" ### tHiS rEtUrNs TrUe... ### Thing Explainer is a book written by a man. The man writes books with simple words. ### This set of stuff "#!^{>7( must return true 偽り: 次の例では、入力と出力はで区切られてい***ます。異なるテストケースはで区切られ###ます。 This code doesn't return …
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 

6
クロネッカー記号を計算する
こことここに関連リンクがありますが、ここに短いバージョンがあります: 2つの整数の入力がaありb、負の無限大と無限大の間にあります(必要な場合は範囲​​を制限できますが、関数は負の入力を受け入れる必要があります)。 クロネッカー記号の定義 (a|b)入力aおよびb場所のクロネッカーシンボルを返す必要があります (a|b) = (a|p_1)^e_1 * (a|p_2)^e_2 * ... * (a|p_n)^e_n ここでb = p_1^e_1 * p_2^e_2 * ... * p_n^e_n、およびp_iおよびe_iは、の素因数分解における素数と指数ですb。 ここで定義されている奇数の素数のp場合。(a|p)=a^((p-1)/2) (mod p) の場合b == 2、(n|2)={0 for n even; 1 for n odd, n=+/-1 (mod 8); -1 for n odd, n=+/-3 (mod 8) の場合b == -1、(n|-1)={-1 for n<0; …

2
プライムでプログラムを見つける
レッツ・アサイン95から94までの数値0 印字可能なASCII文字: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ スペースは、0である!1であり、そうなるまでに~94ある我々はまた、(タブに95を割り当てます\t(改行まで)および96 \n)。 ここで、N番目の文字が97を法とするN番目の素数が割り当てられている文字より上の文字である無限文字列を考えます。この文字列をSと呼びます。 たとえば、最初の素数は2、2 mod 97は2、2はに割り当てられている"ため、Sの最初の文字はです"。同様に、30番目の素数は113であり、113 mod 97は16であり、16がに割り当てられている0ため、Sの30番目の文字はです0。 Sの最初の1000文字は次のとおりです。 "#%'+-137=?EIKOU[]cgiosy $&*,0>BHJTV\bflrt~ #%1=ACGMOY_ekmswy"046:HNXZ^dlrx|!)-5?AKMSW]eiko{"&.28DFX^hntv|%+139?CEQ[]agmo{ $,6>HPV\`hnrz~+5ACMOSU_mqsw$(*.BFNX`djp~!'-5;GKQS]_eoq{}"48:>DJRX^tv '17=EQU[aciu 026<>DHJNZ\b#)/7ISaegkqy} $0:<@BFLXdlx~!'/3;?MQWY]ceku(.24LPR\hjt|!'-?EIKWamu$28<>BDNZ`fxz)+AGOUY[_gmwy"0:@LNRT^jl|~#')3;Meiow&(,4DFJRX^bnp%+-37=KQUW]agsy ,06BJPTn )15;=CYegw ".<FHLTZ`dfjpx|~#-/9AES]ikquw&48>FLPbjtz '1=KOU[]y{$,0>BJV\hlr%/1A[_amsw"(04<RTXZf!#)/59?AMQ]_ik{},2FV^bdhj '39CEIOQWacoy{$28<BJPVfrtx%+/7AIOUkqs}*.4FHR`dfp~!);?EGKQS_cw,8:>DJLRhjp %139EUW[aosu&>HNPZ\fhrxz#%/5=[egqy (:@LXZlrv|!35?MSWY]uw"(8@FL^nptz|!'17COacim &>BDHNP\`n+5;GU[eqsw}$*46:HNTX^`jl|'/AEKWY_ek&,:>FPXdvz| 7CIK[agu ,0NTZ`hnrt %)+1GMOSegkwy "<BHLT^~-/59;?AKY_cku{.24:X\dntz!'37=?EIOQ[]ms&*6D`fz~/7=AGU[akmw"*46@HT^vx|#)-5GQW]_eo{}&,28@FPVX^djt|39OQcgoy6>PTV`fhnr#+7IY_ams} (*0:HLdfvx!#-AEGKScioq},48>\^hjptz '-1=CKW[iu 6<HNPfn )/=ACIS[aek(6@BNXZjl~5GM]ouw(,24>FPV\dhnpz|'+179EIWims&*28<DHV\`nz~ =AY_eq}*046:LR^ Stack Exchangeはタブをスペースに変換するため、タブをそのままにしたPasteBinを次に示します。 チャレンジ いくつかの正の整数Mについて、最初のM個の素数を1行に1つずつ順に出力する、選択した言語で有効なプログラムであるSの部分文字列を見つけます。 たとえば、2はSのサブストリング(複数の場所で発生しますが、どこでも発生します)であり、出力が次のよう2な有効なCJamプログラムです 2 これは最初のM = 1の素数であり、1行に1つずつ順番に並べられます。 同様に、文字2N3N5列はSの部分文字列である可能性があり、2N3N5出力する有効なCJamプログラムです。 2 3 5 これは、最初のM …


5
最も巧妙な素数を見つける
はじめに ある基数bでいくつかの正の整数nを取り、各数字をその数字の基数の右側の表現で置き換えるプロセスを検討してください。 右側の数字が0の場合は、基数bを使用します。 右側の数字が1の場合、タリーマークとして0の単項を使用します。 右側に数字がない場合(つまり、1の場所にいる場合)は、最上位の数字までループします。 例として、n = 160およびb = 10とします。プロセスの実行は次のようになります。 The first digit is 1, the digit to the right is 6, 1 in base 6 is 1. The next digit is 6, the digit to the right is 0, 0 is not a base so use b, 6 in …

15
近くの素数を出力する
入力(素数である場合もそうでない場合もある)を取り、直後および直後の素数をリストするプログラムを記述します。 入力例: 1259 出力例: 1249 1277 最短のプログラムが勝ちます。最新のデスクトップPCでは10秒以内に実行する必要があります。入力は最大10,000に制限されます。

2
この番号をデコードしてください!
この課題は、整数nを別の整数としてエンコードするアルゴリズムを提起しましたr。以下はn=60、例として使用して、そのアルゴリズムの簡潔な説明です。 オリジナルのアルゴリズム まず、括弧の文字列として数値をエンコードします。 の場合n = 1、空の文字列を返します。 それ以外の場合は、n昇順でソートされたの素数分解を取り、各要素を角括弧内のその素数インデックス(1インデックス付き)で置き換えます。60 = 2*2*3*5 => [1][1][2][3] ブラケットがすべて揃うまでこれを再帰的に行います。 [1][1][2][3] => [][][[1]][[2]] => [][][[]][[[1]]] => [][][[]][[[]]] ブラケットの文字列を取得したら、次のプロセスでそれを整数に変換します。 各開始ブラケットをaに1、各終了ブラケットをaに変換します0。[][][[]][[[]]] => 10101100111000 末尾0のと最後のをすべて削除します1。10101100111000 => 1010110011 0sと1sの最後の文字列をバイナリから整数に変換します。1010110011 => 691 このエンコーディングをデコードする このアルゴリズムの興味深い特性は、全射的ではないことです。すべての整数がこのエンコードの結果であるとは限りません。 まず、結果のバイナリ表現はr、でなければならないbalance-able多くのことで0sは数超えてはならない1のです。短い偽のテストケースはで4、これは100バイナリです。 次に、バイナリ表現の角かっこは、sorted ascending最後のs 1と末尾0のsがもう一度追加されるときでなければなりません。短い誤ったテストケースは12 <= 1100 <= 110010 <= (())()です。 ただし、この方法で数値がデコード可能かどうかを判断するだけでは、短い課題が生じます。代わりに、課題は、デコードできない数値またはサイクルに到達するまで所定の入力を繰り返しデコードし、結果として得られる数値のシーケンスを返すことです。 チャレンジ 数与えられ1 <= r <= 2**20 = 1048576、戻り数列r …

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.