Gce Model Questions Vol1 2018 Computer Studies Question 35
Practice objective / multiple choice question 35 from the 2018 Gce Model Questions Vol1 Computer Studies examination.
Write a Python program that reads an integer \(N\) (\(1 \le N \le 10^{6}\)) and outputs the count of numbers \(k\) with \(1 \le k \le N\) that satisfy exactly one of the following conditions (exclusive‑OR): 1. \(k\) is divisible by 3. 2. The decimal representation of \(k\) contains the digit 3. After writing the algorithm, determine the output for \(N = 1000\). Also state the time‑complexity of your solution in Big‑O notation. (Do not provide the full source code; describe the algorithm in clear steps and give the final numeric answer.)
Answer Options
About This Question
This is Gce Model Questions Vol1 2018 Computer Studies Question 35. It is one of the objective questions from the 2018 Gce Model Questions Vol1 Computer Studies examination.
Difficulty level: Hard .
Master the Exam!
You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.