knightnemo commited on
Commit
fceb5e4
·
verified ·
1 Parent(s): 0242fe6

Upload code_segments/segment_89.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. code_segments/segment_89.txt +19 -0
code_segments/segment_89.txt ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ A digit is large if it is between $5$ and $9$, inclusive. A positive integer is large if all of its digits are large.
2
+
3
+ You are given an integer $x$. Can it be the sum of two large positive integers with the same number of digits?
4
+
5
+ The first line contains a single integer $t$ ($1 \leq t \leq 10^4$) — the number of test cases.
6
+
7
+ The only line of each test case contains a single integer $x$ ($10 \leq x \leq 10^{18}$).
8
+
9
+ For each test case, output $\texttt{YES}$ if $x$ satisfies the condition, and $\texttt{NO}$ otherwise.
10
+
11
+ You can output $\texttt{YES}$ and $\texttt{NO}$ in any case (for example, strings $\texttt{yES}$, $\texttt{yes}$, and $\texttt{Yes}$ will be recognized as a positive response).
12
+
13
+ In the first test case, we can have $658 + 679 = 1337$.
14
+
15
+ In the second test case, it can be shown that no numbers of equal length and only consisting of large digits can add to $200$.
16
+
17
+ In the third test case, we can have $696\,969 + 696\,969 = 1\,393\,938$.
18
+
19
+ In the fourth test case, we can have $777 + 657 = 1434$.