Easy Live

Simple Programming

30 points

2528 Solves

Programming

Easy

intelagent moderator badge ctflearn++ badge

Community Rating: 4.47 / 5

Can you help me? I need to know how many lines there are where the number of 0's is a multiple of 3 or the numbers of 1s is a multiple of 2. Please! Here is the file: https://mega.nz/#!7aoVEKhK!BAohJ0tfnP7bISIkbADK3qe1yNEkzjHXLKoJoKmqLys

First 10 Solvers

Rank Username
1 koshi
2 jowls
3 ross3102
4 emperorlepone
5 aboudster

  • Formadill

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • KappaDetective

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

    • wannabehacker1234

      Protected

      [REDACTED] This comment is only shown to users who have solved this challenge.

      • Lindaine

        Protected

        [REDACTED] This comment is only shown to users who have solved this challenge.

  • k4at3034

    excellent programming CTF for beginners

  • mo999

    its simple program write script to read the file an count that line which is its one divisible by 2 OR its zeros divisible by 3 simple use mod

  • mo999

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • mo999

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • NorthLake

    I know how I can solve the problem, but what is the flag exactly? It's not explained how the flag should be formulated.

    • intelagent moderator badge ctflearn++ badge

      The flag is just the number. If you were to wrap it in CTFlearn{} it would also work! We have a pretty robust flag checking system!

        • meganuke

          me too! I have the number but I just can't enter the flag

  • A23187

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • NullString

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • yohji

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • IronLarreh_

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • rickdeckard

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • Fl4Gg3R

    I got the answer but what format am i supposed to submit it in????

  • Fl4Gg3R

    This is a really great challenge in my opinion.

  • gosobog

    I used c++ and the hardest part was to put space int the end of every line.

  • gosobog

    I used c++ and the hardest part was to put space int the end of every line.

  • quido18

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • maroo

    dobra nie chwalcie się tak zjeby że rozwiązaliście łatwe zadanie

  • xyuru

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • doteq

    I used regex with node.js ```const fs = require('fs') var text = fs.readFileSync('./data.dat','utf8')

    function count0(bin){ var arr = bin.match(/(0)/g); return arr ? arr.length : 0; } function count1(bin){ var arr = bin.match(/(1)/g); return arr ? arr.length : 0; }

    var binArray = text.split('\n') var succArray = []

    binArray.forEach((bin) => { var zeros = count0(bin); var ones = count1(bin); if(ones % 2 == 0){ succArray.push(bin); } else if(zeros % 3 == 0){ succArray.push(bin); } }); console.log(succArray.length)```

  • makoteq

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • seishin

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • maxk05

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • Kasza

    v cool. needed to remind myself how to read files in py, because i didn't want to do it in bash

  • Mossi13

    Yeah! Excellent task for the beginner. I'm pleased :D

  • cardynlsyn ctflearn++ badge

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.

  • Sidpatchy

    Protected

    [REDACTED] This comment is only shown to users who have solved this challenge.