Clear it in 3 steps
-
Start the environment
-
Investigate the target
-
Submit the flag
/app/numbers.txt contains numbers from 1 to 1000, one per line. Extract all numbers that satisfy these conditions and calculate their sum: Conditions: - Divisible by both 3 and 5 - NOT divisible by 7 Create a bash script to solve this. The sum is the flag.
Use while read loop to read file line by line
Check divisibility with if [ $((num % 3)) -eq 0 ]
Accumulate in sum variable and echo $sum at the end