Mars Exploration

Sort by

recency

|

1081 Discussions

|

  • + 0 comments
    def marsExploration(s):
        i = 0
        count = 0
        while i < len(s):
            if(s[i]!="S"):
                count = count + 1
            if(s[i+1] != "O"):
                count = count + 1
            if(s[i+2] != "S"):
                count = count + 1
            i = i + 3
        return count 
    
  • + 0 comments

    Mars exploration has always sparked human curiosity, pushing scientists and engineers to discover new ways of reaching beyond Earth. Every mission reveals more about the planet’s surface, atmosphere, and potential for life, making space travel feel closer to reality. The effort to explore Mars also inspires innovation across different fields, from technology to business setup services that support companies aiming to enter the space industry. As nations and private organizations invest in this journey, opportunities keep growing for those who want to be part of the future. Mars may still be millions of miles away, but the vision to reach it continues to shape how humanity thinks about progress.

  • + 0 comments

    In c# public static int marsExploration(string s) { var correctMessage = string.Concat(Enumerable.Repeat("SOS",s.Length/3)); return correctMessage.Where((c, i) => c != s[i]).Count(); }

  • + 0 comments
    # Mars Exploration 🚀
    def mars_exploration(s):
        e = "SOS" * (len(s) // 3) # expected message
        return sum( [1 for i in range(len(s)) if s[i] != e[i]] )
    
  • + 1 comment

    int marsExploration(char* s) { char* a = malloc(strlen(s)*sizeof(char)); strcpy(a,s); int count=0; for(int i=0;a[i]!='\0';i++){ if(a[i]!='S' && a[i]!='O') count++; } return count; } Why it is showing only some test cases are fail?