SAZEDUR

Who am I? I don’t know :c

[Solutions] Bangladesh Artificial Intelligence Olympiad (BdAIO) 2025 – Mock Contest

This blog contains all of my solutions to the mock contest of BDAIO. Why did I post this? Because I felt like doing it even tho these questions are way too easy to solve 🙂

This thingy is for beginners, didn’t include explanations because too easy to put in 🙂

A. Fibonacci Numbers[solution]

def fibonacci(n):
    if n == 1 or n == 2:
        return 1
    a, b = 1, 1
    for _ in range(3, n + 1):
        a, b = b, a + b
    return b

N = int(input())
print(fibonacci(N))

B. Divisors[solution]

n = int(input())

def divisor(n):
    for i in range(1,n+1):
        if n%i == 0:
            print(i)
divisor(n)        

C. Match Sticks[solution]

import sys

def yes_or_no(n):
    n_fin = n - 2
    if n > 4 and n_fin % 3 == 0:
        print("Yes")
    else:
        print("No")

for line in sys.stdin:
    n = int(line.strip())
    yes_or_no(n)

D. Passwords[solution]

import sys

def how_many_pass(s):
    check_lower = 0
    check_upper = 0
    check_digit = 0
    pass_count = 0
    for char in s:
        if char.islower():
            check_lower = 1
        elif char.isupper():
            check_upper = 1
        elif char.isdigit():
            check_digit = 1
        if check_lower + check_upper + check_digit == 3:
            pass_count += 1
            check_lower = check_upper = check_digit = 0 
    print(pass_count)

for line in sys.stdin:
    s = line.strip()
    how_many_pass(s)

E. Byang’s Day Out[solution]

import sys

def yes_or_no(a, b, c):
    if a + b >= c and a + c >= b and b + c >= a:
        return "Yes"
    else:
        return "No"

input_lines = sys.stdin.read().splitlines()
t = int(input_lines[0])

for i in range(1, t + 1):
    a, b, c = map(int, input_lines[i].split())
    print(yes_or_no(a, b, c))

6 responses to “[Solutions] Bangladesh Artificial Intelligence Olympiad (BdAIO) 2025 – Mock Contest”

  1. This is another test comment

  2. Did the solution of problem e really got accepted? I wrote similar code but it exceeded the time limit.

    1. sazedurrahman707@gmail.com Avatar
      sazedurrahman707@gmail.com

      They all are correct and got accepted 🙂

  3. xPpUH Kmw WtXXp JddQV UuOVTWQ Kns

Leave a Reply to another test name Cancel reply

Your email address will not be published. Required fields are marked *