Submission #38678223


Source Code Expand

Copy
P = 998244353
N = gets.to_i
X = gets.chomp.bytes.map{|b| b-48 }
l1,l0 = 0,1
X.each{|d|
l1,l0 = (l1*10+l0*d + l1*d)%P,l1+l0
}
p l1
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
P = 998244353
N = gets.to_i
X = gets.chomp.bytes.map{|b| b-48 }

l1,l0 = 0,1
X.each{|d|
	l1,l0 = (l1*10+l0*d + l1*d)%P,l1+l0
}

p l1

Submission Info

Submission Time
Task F - Integer Division
User ds14050
Language Ruby (2.7.1)
Score 500
Code Size 143 Byte
Status AC
Exec Time 91 ms
Memory 17660 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 500 / 500
Status AC
AC × 23
Set Name Test Cases
Sample
All sample00.txt, sample01.txt, sample02.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt, testcase13.txt, testcase14.txt, testcase15.txt, testcase16.txt, testcase17.txt, testcase18.txt, testcase19.txt
Case Name Status Exec Time Memory
sample00.txt AC 61 ms 14152 KB
sample01.txt AC 56 ms 14128 KB
sample02.txt AC 56 ms 14104 KB
testcase00.txt AC 87 ms 17476 KB
testcase01.txt AC 86 ms 17656 KB
testcase02.txt AC 86 ms 17312 KB
testcase03.txt AC 86 ms 17396 KB
testcase04.txt AC 90 ms 17488 KB
testcase05.txt AC 88 ms 17548 KB
testcase06.txt AC 87 ms 17564 KB
testcase07.txt AC 86 ms 17540 KB
testcase08.txt AC 87 ms 17396 KB
testcase09.txt AC 90 ms 17580 KB
testcase10.txt AC 87 ms 17504 KB
testcase11.txt AC 91 ms 17460 KB
testcase12.txt AC 86 ms 17520 KB
testcase13.txt AC 86 ms 17468 KB
testcase14.txt AC 89 ms 17304 KB
testcase15.txt AC 89 ms 17616 KB
testcase16.txt AC 87 ms 17468 KB
testcase17.txt AC 87 ms 17584 KB
testcase18.txt AC 86 ms 17660 KB
testcase19.txt AC 85 ms 17448 KB


2025-04-08 (Tue)
09:47:05 +00:00