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.

Gce Model Questions Vol1 2018 Computer Studies Objective / Multiple Choice Hard Difficulty
Question 35 GCE_MODEL_QUESTIONS_VOL1 • 2018 • COMPUTER_STUDIES • objective

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

A. 421
B. 425
C. 440
Correct Answer D. 422
Correct Answer
D
Correct Option:
422

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.

Unlock Full Access Available for Android & Windows
Chat with Support