Problem - 1766A - Codeforces
Problem - 1766A - Codeforces
|
riteshnub | Logout
You have +385! Wow!
HOME TOP CATALOG CONTESTS GYM PROBLEMSET GROUPS RATING EDU API CALENDAR HELP
00:00:12
Let's call a positive integer extremely round if it has only one non-zero digit. For example, → Virtual participation
5000 , 4, 1, 10 , 200 are extremely round integers; 42 , 13 , 666, 77 , 101 are not.
Virtual contest is a way to take part in past
contest, as close as possible to participation
You are given an integer n. You have to calculate the number of extremely round integers x on time. It is supported only ICPC mode for
such that 1 ≤ x ≤ n. virtual contests. If you've seen these
problems, a virtual contest is not for you -
solve these problems in the archive. If you
Input just want to solve some problem from a
contest, a virtual contest is not for you -
The first line contains one integer t (1 ≤ t ≤ 10
4
) — the number of test cases. solve this problem in the archive. Never use
someone else's code, read the tutorials or
Then, t lines follow. The i -th of them contains one integer n (1 ≤ n ≤ 999999 ) — the communicate with other person during a
virtual contest.
description of the i -th test case.
Start virtual contest
Output
For each test case, print one integer — the number of extremely round integers x such that
1 ≤ x ≤ n.
→ Clone Contest to Mashup
Example You can clone this contest to a mashup.
input Copy
Clone Contest
5
9
42
13 → Submit?
100
111 Language: GNU G++17 7.3.0
output Copy
Choose
Choose File No file chosen
9 file:
13
10 Submit
19
19
→ Problem tags
→ Contest materials
Announcement
Tutorial
Supported by
https://codeforces.com/problemset/problem/1766/A 1/2
4/2/24, 9:00 AM Problem - 1766A - Codeforces
https://codeforces.com/problemset/problem/1766/A 2/2