Codeforces Round 991 (Div. 3)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
2050 Codeforces Round 991 (Div. 3) FINISHED False 8100 42996323 Dec. 5, 2024, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 24905 ) C Uninteresting Number PROGRAMMING brute force dp math

You are given a number (n) with a length of no more than (10^5). You can perform the following operation any number of times: choose one of its digits, square it, and replace the original digit with the result. The result must be a digit (that is, if you choose the digit (x), then the value of (x^2) must be less than (10)). Is it possible to obtain a number that is divisible by (9) through these operations? The first line contains an integer (t) ((1 \le t \le 10^4)) — the number of test cases. The only line of each test case contains the number (n), without leading zeros. The length of the number does not exceed (10^5). It is guaranteed that the sum of the lengths of the numbers across all test cases does not exceed (10^5). For each test case, output " YES " if it is possible to obtain a number divisible by (9) using the described operations, and " NO " otherwise. You can output each letter in any case (lowercase or uppercase). For example, the strings " yEs ", " yes ", " Yes ", and " YES " will be accepted as a positive answer. In the first example, from the integer (123), it is possible to obtain only (123), (143), (129), and (149), none of which are divisible by (9). In the second example, you need to replace the second digit with its square; then (n) will equal (342 = 38 \cdot 9). In the third example, the integer is already divisible by (9).

Tutorials

Разбор Codeforces Round 991 (Div. 3)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
295145159 jiaqiangliu C Dec. 6, 2024, 1:38 a.m. OK C++17 (GCC 7-32) TESTS 6 30 102400
295120871 sbarreto C Dec. 5, 2024, 7:25 p.m. OK C++17 (GCC 7-32) TESTS 6 31 0
295115251 tnwrshubham52 C Dec. 5, 2024, 6:31 p.m. OK C++17 (GCC 7-32) TESTS 6 31 0
295111949 zaid_khan C Dec. 5, 2024, 6:06 p.m. OK C++17 (GCC 7-32) TESTS 6 31 0
295116729 Mauricio_7 C Dec. 5, 2024, 6:44 p.m. OK C++17 (GCC 7-32) TESTS 6 31 0
295164995 hocproteus C Dec. 6, 2024, 4:08 a.m. OK C++17 (GCC 7-32) TESTS 6 31 102400
295171141 SXC_ch C Dec. 6, 2024, 4:59 a.m. OK C++17 (GCC 7-32) TESTS 6 31 102400
295157568 cx060626 C Dec. 6, 2024, 3:14 a.m. OK C++17 (GCC 7-32) TESTS 6 31 102400
295110080 Abstract_monster C Dec. 5, 2024, 5:53 p.m. OK C++17 (GCC 7-32) TESTS 6 31 8089600
295180413 lazysapien C Dec. 6, 2024, 6:05 a.m. OK C++17 (GCC 7-32) TESTS 6 46 0
295133898 brenner1 C Dec. 5, 2024, 10:42 p.m. OK C++20 (GCC 13-64) TESTS 6 30 102400
295173523 Mustafo_Shukurov C Dec. 6, 2024, 5:16 a.m. OK C++20 (GCC 13-64) TESTS 6 31 0
295155271 zzhi C Dec. 6, 2024, 2:58 a.m. OK C++20 (GCC 13-64) TESTS 6 31 0
295139567 daviromao C Dec. 5, 2024, 11:58 p.m. OK C++20 (GCC 13-64) TESTS 6 31 0
295130334 lelouX C Dec. 5, 2024, 9:29 p.m. OK C++20 (GCC 13-64) TESTS 6 31 0
295128407 cowthecow C Dec. 5, 2024, 9 p.m. OK C++20 (GCC 13-64) TESTS 6 31 0
295127762 EnquisitelyCurious C Dec. 5, 2024, 8:49 p.m. OK C++20 (GCC 13-64) TESTS 6 31 0
295127357 nayan_2207 C Dec. 5, 2024, 8:43 p.m. OK C++20 (GCC 13-64) TESTS 6 31 0
295121725 yazanmahfooz C Dec. 5, 2024, 7:34 p.m. OK C++20 (GCC 13-64) TESTS 6 31 0
295120858 bajpai660 C Dec. 5, 2024, 7:25 p.m. OK C++20 (GCC 13-64) TESTS 6 31 0
295152922 gaming10054 C Dec. 6, 2024, 2:40 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 30 0
295134928 JakovJ C Dec. 5, 2024, 11:11 p.m. OK C++23 (GCC 14-64, msys2) TESTS 6 30 0
295106897 0XBit C Dec. 5, 2024, 5:33 p.m. OK C++23 (GCC 14-64, msys2) TESTS 6 31 0
295159519 p_2626 C Dec. 6, 2024, 3:27 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 31 0
295154486 hangz C Dec. 6, 2024, 2:51 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 31 0
295141456 AbdoMO C Dec. 6, 2024, 12:14 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 31 0
295123288 RustyCoder1337 C Dec. 5, 2024, 7:50 p.m. OK C++23 (GCC 14-64, msys2) TESTS 6 31 0
295107664 TheRiddlerRihad C Dec. 5, 2024, 5:37 p.m. OK C++23 (GCC 14-64, msys2) TESTS 6 31 0
295107006 Baraah_Mohammed C Dec. 5, 2024, 5:34 p.m. OK C++23 (GCC 14-64, msys2) TESTS 6 31 0
295164290 hnust_wanjiawen C Dec. 6, 2024, 4:02 a.m. OK C++23 (GCC 14-64, msys2) TESTS 6 31 102400
295123235 Brackets12 C Dec. 5, 2024, 7:49 p.m. OK FPC TESTS 6 77 2457600
295166559 jkpromax C Dec. 6, 2024, 4:19 a.m. OK GNU C11 TESTS 6 46 102400
295178979 thunder-saint C Dec. 6, 2024, 5:58 a.m. OK GNU C11 TESTS 6 46 204800
295098407 kumardasshankit973 C Dec. 5, 2024, 4:58 p.m. OK GNU C11 TESTS 6 46 614400
295160106 Zimu C Dec. 6, 2024, 3:31 a.m. OK GNU C11 TESTS 6 61 204800
295180195 shashwat_1681 C Dec. 6, 2024, 6:04 a.m. OK GNU C11 TESTS 6 62 0
295103459 QwQ12321 C Dec. 5, 2024, 5:17 p.m. OK GNU C11 TESTS 6 62 102400
295113283 BhanuSri C Dec. 5, 2024, 6:16 p.m. OK GNU C11 TESTS 6 62 204800
295099108 kumardasshankit973 C Dec. 5, 2024, 5 p.m. OK GNU C11 TESTS 6 77 0
295174478 MahendraVarma C Dec. 6, 2024, 5:22 a.m. OK GNU C11 TESTS 6 77 204800
295104231 Prakharg_8651 C Dec. 5, 2024, 5:20 p.m. OK GNU C11 TESTS 6 77 204800
295101233 alifer C Dec. 5, 2024, 5:08 p.m. OK Go TESTS 6 62 2560000
295125232 jayeshgoel74 C Dec. 5, 2024, 8:14 p.m. OK Java 21 TESTS 6 218 0
295114858 amit_roy C Dec. 5, 2024, 6:28 p.m. OK Java 21 TESTS 6 233 512000
295095499 -Jarvis- C Dec. 5, 2024, 4:49 p.m. OK Java 21 TESTS 6 234 819200
295121300 arnabmanna C Dec. 5, 2024, 7:29 p.m. OK Java 21 TESTS 6 234 1433600
295174965 ankitraj_129 C Dec. 6, 2024, 5:26 a.m. OK Java 21 TESTS 6 249 512000
295113804 roofaccess C Dec. 5, 2024, 6:20 p.m. OK Java 21 TESTS 6 249 614400
295169777 rshonkhia65 C Dec. 6, 2024, 4:47 a.m. OK Java 21 TESTS 6 249 1126400
295127346 nikele C Dec. 5, 2024, 8:43 p.m. OK Java 21 TESTS 6 250 614400
295179102 Devil_Kira C Dec. 6, 2024, 5:59 a.m. OK Java 21 TESTS 6 264 102400
295175799 ManasM01 C Dec. 6, 2024, 5:33 a.m. OK Java 21 TESTS 6 264 409600
295139128 sarahejaz77 C Dec. 5, 2024, 11:54 p.m. OK Java 8 TESTS 6 124 0
295167744 2manas1 C Dec. 6, 2024, 4:28 a.m. OK Java 8 TESTS 6 155 0
295144603 Sreven C Dec. 6, 2024, 1:24 a.m. OK Java 8 TESTS 6 155 0
295179712 __Aniket__ C Dec. 6, 2024, 6:02 a.m. OK Java 8 TESTS 6 171 0
295115104 Soumadip_Mishra C Dec. 5, 2024, 6:30 p.m. OK Java 8 TESTS 6 171 0
295118412 an1k3t C Dec. 5, 2024, 7 p.m. OK Java 8 TESTS 6 202 0
295179942 lpychemistry C Dec. 6, 2024, 6:03 a.m. OK Java 8 TESTS 6 202 0
295131989 yogesh013 C Dec. 5, 2024, 9:58 p.m. OK Java 8 TESTS 6 202 0
295126565 thegreat_gordini14 C Dec. 5, 2024, 8:32 p.m. OK Java 8 TESTS 6 202 0
295100058 codesuv C Dec. 5, 2024, 5:03 p.m. OK Java 8 TESTS 6 203 0
295122038 mithu000 C Dec. 5, 2024, 7:37 p.m. OK Node.js TESTS 6 187 7475200
295119896 mithu000 C Dec. 5, 2024, 7:15 p.m. OK Node.js TESTS 6 187 26828800
295099018 TIMOfey_5 C Dec. 5, 2024, 5 p.m. OK PascalABC.NET TESTS 6 218 1024000
295119634 yusupbekmyradow4 C Dec. 5, 2024, 7:13 p.m. OK PascalABC.NET TESTS 6 249 1126400
295096559 maamruthan2 C Dec. 5, 2024, 4:52 p.m. OK PyPy 3 TESTS 6 186 6860800
295100391 AbhiKamboj C Dec. 5, 2024, 5:04 p.m. OK PyPy 3 TESTS 6 218 8192000
295106434 noobnessmee C Dec. 5, 2024, 5:30 p.m. OK PyPy 3 TESTS 6 234 6860800
295094351 octtastic C Dec. 5, 2024, 4:48 p.m. OK PyPy 3 TESTS 6 312 9523200
295119285 abbs03 C Dec. 5, 2024, 7:09 p.m. OK PyPy 3 TESTS 6 343 9216000
295106062 noobnessmee C Dec. 5, 2024, 5:28 p.m. OK PyPy 3 TESTS 6 437 9830400
295109795 parinavputhran C Dec. 5, 2024, 5:51 p.m. OK PyPy 3 TESTS 6 609 9932800
295123274 gardengnome C Dec. 5, 2024, 7:50 p.m. OK PyPy 3-64 TESTS 6 124 2969600
295130856 senguptasushruta C Dec. 5, 2024, 9:38 p.m. OK PyPy 3-64 TESTS 6 124 3788800
295131102 Haksell C Dec. 5, 2024, 9:42 p.m. OK PyPy 3-64 TESTS 6 124 5017600
295141608 gaidash C Dec. 6, 2024, 12:16 a.m. OK PyPy 3-64 TESTS 6 124 13107200
295129612 smilence C Dec. 5, 2024, 9:18 p.m. OK PyPy 3-64 TESTS 6 139 3891200
295163385 amongsus C Dec. 6, 2024, 3:54 a.m. OK PyPy 3-64 TESTS 6 140 5836800
295111467 n4bu C Dec. 5, 2024, 6:03 p.m. OK PyPy 3-64 TESTS 6 140 5939200
295104155 Sandeep_P C Dec. 5, 2024, 5:20 p.m. OK PyPy 3-64 TESTS 6 140 6451200
295129088 delusionX C Dec. 5, 2024, 9:09 p.m. OK PyPy 3-64 TESTS 6 155 5632000
295139215 pyqjw C Dec. 5, 2024, 11:55 p.m. OK PyPy 3-64 TESTS 6 155 5734400
295175732 sisobus C Dec. 6, 2024, 5:33 a.m. OK Python 3 TESTS 6 77 0
295169277 dipak12.11 C Dec. 6, 2024, 4:42 a.m. OK Python 3 TESTS 6 78 307200
295159940 doni69 C Dec. 6, 2024, 3:30 a.m. OK Python 3 TESTS 6 92 0
295126794 samsonite C Dec. 5, 2024, 8:34 p.m. OK Python 3 TESTS 6 93 0
295099257 Vrinda_156 C Dec. 5, 2024, 5:01 p.m. OK Python 3 TESTS 6 93 1740800
295156192 dashk11 C Dec. 6, 2024, 3:05 a.m. OK Python 3 TESTS 6 108 0
295168071 D_Malhar04 C Dec. 6, 2024, 4:32 a.m. OK Python 3 TESTS 6 108 409600
295152751 Vss202894_Amt_ul_rehman C Dec. 6, 2024, 2:39 a.m. OK Python 3 TESTS 6 108 1740800
295117475 sonclhoang C Dec. 5, 2024, 6:52 p.m. OK Python 3 TESTS 6 108 2457600
295163923 Sirens C Dec. 6, 2024, 3:58 a.m. OK Python 3 TESTS 6 109 0
295152260 Captainfly C Dec. 6, 2024, 2:35 a.m. OK Rust 2021 TESTS 6 46 0
295126725 0x81 C Dec. 5, 2024, 8:34 p.m. OK Rust 2021 TESTS 6 62 0

remove filters

Back to search problems