6 kyu

Blind Numbers

Description
Loading description...
Mathematics
Fundamentals
  • Please sign in or sign up to leave a comment.
  • JohanWiltink Avatar

    10-adic numbers

    according to Google: "10-adic numbers are base-10-expressed numbers that have an unlimited number of digits to the left of the decimal point"

    If the description means "numbers in base 10", it should not specify "10-adic numbers".

  • JohanWiltink Avatar

    Numbers that don't contain 00 are called Blind Numbers. Count .. that are not Blind Numbers. So that do contain 00.

    And then the example excludes numbers that do contain 00.

    Either the description is wrong, or it contains so many negatives I lost track, and should be improved.

  • tobeannouncd Avatar
  • woega Avatar

    Hmmm I have an O(1) solution, but the numbers get really big before I can convert to int and perform the modulo operation ...

    any suggestions?

  • saudiGuy Avatar

    Fork to close all open issues.

  • ahmet_popaj Avatar

    Nice kata, I wouldn't thought the solution could be so easy.

  • gaborod16 Avatar

    I like the kata although I haven't finished solving it myself.

    I do have issues with it. It is extremely hard to understand what the kata is about.

    The numbers will be very huge, so return the answer modulo 1000000007

    • Which numbers will be huge? Maybe just provide an example of what you mean.

    He calls numbers, that don't contain 00 (two consecutive zeros), the Blind Numbers

    • This sentence tripped me over. I thought it was wrong since there is a double negative.
    • The fact that the "Blind Numbers" are the ones without 00 is unexpected and confusing given the narrative.
  • FArekkusu Avatar

    Tests are using describe and it blocks incorrectly.

  • FArekkusu Avatar

    Tests should import the test framework and solution explicitly.

  • Kacarott Avatar

    Typo relly in into paragraph.

    Overall the intro paragraph is very hard to understand and bad english. I am not trying to blame the author, but it should be rewritten to be understandable.

  • Blind4Basics Avatar

    6 kyu... This is yet another fucking joke...

    • Considering the perf requirements, this is NOT 6 kyu.
    • Considering the reasonning needed to get there, this is NOT 6 kyu

    THIS IS 6 KYU, FOR FUCK SAKE: https://www.codewars.com/kata/5a626fc7fd56cb63c300008c/

  • user9644768 Avatar

    This comment has been hidden.

  • user9644768 Avatar

    Yet another variation of fibonacci

  • krishp Avatar

    You have a constraint on x, but no where in the description do you mention what x is. Is it referring to N?

  • Unnamed Avatar

    This comment has been hidden.

  • Unnamed Avatar
    5841
    365823695274822308246763625981125250768026620900177562818446672523486196109810820017961545414470328550215226773160361244386964114106809922307618252699634742303038991133435423913896345759400039178005030292012507698116920549523480987149055547638821066568769937667045752849432306737275221259353427285908925730101534002392243480415582907612504649895914597399758170365649221257777221825473626541306326600039881789731441793340650923645947569615373474980289938470518989246481987577609100178810525263950392875264605318912230448975485767222701471098719202301172842836072483982324678332756665299230041155053664853591327177076380520672977059404893891745940741150018862222715981467277801660033606855672764423016022159161620320653765426354212349616458820712748814205143811780237644155770771121657144653250521673321232574378814401622579441868586050820821889514852899605412813260318315519238566160634761781351103734210786681786114034998728680415833981437084813731291384224696504462067068275162629281544727767870364474395620466879977909754649525062214332716183464421595806145366708764102713294558658190285778927963679812486413936364177583282179213325218920469908108282516455611290922542378501278424886146431128622532391930129615939243566125296551423704734743997715423936081843009093954478770672787186305125766172453067063054656949323550559764822643144292117379910517839539648263541296237683947941372807606262951396176932126376617407846389055148540276006680809221590993134886545858642657795634271135564074310072909079187184227458921972655809422397636206919399371606253726096848669975669966605127891924045422070560526906574357040037904394690360466552811724841568514912885969347777490719925566694670153340959024081975127378449056980724355155104936607654772116757750081861251963084163860803953833813490760258539209945991387967877953562825290676538940963723377836245785143583161974861749605800370525199555031007656277212975072878893362475493755565057414661782887907187664892992394740471904488724827333956965631097118400480550886128544874850448589136318915951908346922684679889761722698331376072242989135297546759620912239647564284091709902597470477911971155966400441903781505521594747869224872577065712931359183575418665479621722041352987358497705816282512716389129544971287360102516916824504768047085338808960060488072487583926904542700715226891890184923766172079948663473738293726320871323220371375905764697089140373537145234128353570396326408686002253001778156135068193593431490385037039167383786019158101978396133359768591642724399426324097077860283339099366402031616
    should equal 186405645
    
    4680
    630678471329056920022883123026416898389233002825279644175486857353106641857665279169265698698582903421475768730966084976530548613699890376372504102545514984431135265835720883281560088285951685860366209182087583024402770900863120800711080446022091089760273321474113253256077885318824267987125821863452701101737779185910955734803801029021725306453610085165559172425067005029731117011718601848494689088318740656334384477573834015409716071847574099417703202291915087290920701151387469563209586495996642516762523573592590713752067887340346534551032381468905924369361919829043004703874384586638864934821002910765509947889563596104506644715636669519902145706573834098495097972596157372131214129861551113858646088727791447518248823624607757993088016150061581161332502813630704073193380966504041043580557988796936825108870793119006784666548277661876214179798845180339478400635881500598513320277695891521483393908050472669556753704330647609450129315904260309770883930635228292721515077462485105528282805496747339366186488172314082923667244625805014931415227528148457601554142229874524091261148378936930224116411705961497278165886448377525569964109181359399024065937081046900969294951168130813182262555863624397476812023933478638225418675376033151518154773020458942389172886679439057592127800331939763536170450345874781135468193144580527279727187119875343527438367825736265848057647604944907344646209495696768985225594680440069922258316650256025604232210042378239838525602515079167087838298528357100942501601065040744510684790513090019797068130111448685859405075969014239127040435992286877124786613344087137975603410874944994899915752464499456139599224129986482937414709026970087673807205522318390459483422907817876823622350246878963373886681991410678532983967570919476192687369525634611345853347262363226970747814562539961118674555387120673183745730933649564360277182971275127664955781091598883793793923641818043650771700380964343595890494155803131813904146083224199732047608049845214858341610462576534155592944525824613667129338226869240439845658034176
    should equal 259339709
    

    I'm pretty sure my solution is correct; and the result for 4680 should be less than for 5841 anyway.