Submission #4338338
Source Code Expand
#!usr/bin/env python3 from collections import defaultdict from heapq import heappush, heappop import math import bisect import random def LI(): return list(map(int, input().split())) def I(): return int(input()) def LS(): return input().split() def S(): return list(input()) def IR(n): return [I() for i in range(n)] def LIR(n): return [LI() for i in range(n)] def SR(n): return [S() for i in range(n)] def LSR(n): return [LS() for i in range(n)] mod = 1000000007 #A """ l = LI() l.sort() print(l[1]) """ #B s = S() ans = [s[0]] i = 1 k = s[0] d = 1 while i < len(s): if s[i] == k: d += 1 else: ans.append(d) k = s[i] d = 1 ans.append(k) i += 1 ans.append(d) for i in range(len(ans)-1): print(ans[i],end = "") print(ans[-1]) #C """ n = II() a = LI() for i in range(n): while not a[i] % 2: a[i] //= 2 a = list(set(a)) print(len(a)) """ #D #E #F #G #H #I #J #K #L #M #N #O #P #Q #R #S #T
Submission Info
Submission Time | |
---|---|
Task | B - 高橋くんと文字列圧縮 |
User | dn6049949 |
Language | PyPy3 (2.4.0) |
Score | 100 |
Code Size | 1059 Byte |
Status | AC |
Exec Time | 237 ms |
Memory | 42732 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | subtask0_1.txt, subtask0_2.txt, subtask0_3.txt |
All | 0.txt, 1.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 2.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, 25.txt, 26.txt, 27.txt, 28.txt, 29.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, subtask0_1.txt, subtask0_2.txt, subtask0_3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0.txt | AC | 223 ms | 42732 KB |
1.txt | AC | 221 ms | 42732 KB |
10.txt | AC | 179 ms | 38512 KB |
11.txt | AC | 183 ms | 38512 KB |
12.txt | AC | 182 ms | 38512 KB |
13.txt | AC | 195 ms | 38512 KB |
14.txt | AC | 183 ms | 38512 KB |
15.txt | AC | 182 ms | 38512 KB |
16.txt | AC | 181 ms | 38512 KB |
17.txt | AC | 188 ms | 38512 KB |
18.txt | AC | 181 ms | 38512 KB |
19.txt | AC | 185 ms | 38512 KB |
2.txt | AC | 222 ms | 42732 KB |
20.txt | AC | 178 ms | 38512 KB |
21.txt | AC | 188 ms | 38512 KB |
22.txt | AC | 183 ms | 38512 KB |
23.txt | AC | 193 ms | 38512 KB |
24.txt | AC | 180 ms | 38512 KB |
25.txt | AC | 181 ms | 38512 KB |
26.txt | AC | 186 ms | 38512 KB |
27.txt | AC | 189 ms | 38512 KB |
28.txt | AC | 189 ms | 38512 KB |
29.txt | AC | 192 ms | 38512 KB |
3.txt | AC | 237 ms | 42732 KB |
4.txt | AC | 229 ms | 42732 KB |
5.txt | AC | 227 ms | 42732 KB |
6.txt | AC | 226 ms | 42732 KB |
7.txt | AC | 230 ms | 42732 KB |
8.txt | AC | 228 ms | 42732 KB |
9.txt | AC | 224 ms | 42732 KB |
subtask0_1.txt | AC | 187 ms | 38512 KB |
subtask0_2.txt | AC | 178 ms | 38512 KB |
subtask0_3.txt | AC | 179 ms | 38512 KB |