Task: | Bittijono |
Sender: | yhyy |
Submission time: | 2016-10-03 18:50:24 +0300 |
Language: | Assembly |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 10 |
#2 | ACCEPTED | 19 |
#3 | ACCEPTED | 71 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.06 s | 1 | details |
#2 | ACCEPTED | 0.06 s | 2 | details |
#3 | ACCEPTED | 0.08 s | 3 | details |
Code
section .bsssyote resb 3000000tuloste resb 300000section .textglobal _start_start:mov eax, 3mov ebx, 0mov ecx, syotemov edx, 3000000int 0x80mov rdi, tulostemov rsi, syotecall lukumov rcx, r9silmukka:call lukuxor r10,r10mov rbx, 1.b:sal rbx, 1cmp rbx, r9jle .bmov rdx, 0hh:sar rbx, 1cmp rbx, r9jge .hinc r10sub r9, rbx.h:cmp r9, 0x1jg hhmov eax, r10dand al, 0x1add al, 0x30stosbmov al, 0xastosbloop silmukkalopeta:mov edx, edisub edx, tulostemov eax, 4mov ebx, 1mov ecx, tulosteint 0x80mov eax, 1mov ebx, 0int 0x80luku:xor rax, raxxor r9, r9.a:lodsbcmp al, 0x30jl .mmcmp al, 0x39jg .mmsub al, 0x30imul r9, 10add r9, raxjmp .a.mm:cmp r9, 0je .aret
Test details
Test 1
Group: 1
Verdict: ACCEPTED
input |
---|
100 62 9 12 73 ... |
correct output |
---|
1 1 1 0 1 ... |
user output |
---|
1 1 1 0 1 ... |
Test 2
Group: 2
Verdict: ACCEPTED
input |
---|
100000 565433 141881 120108 825392 ... |
correct output |
---|
1 1 0 0 1 ... |
user output |
---|
1 1 0 0 1 ... |
Test 3
Group: 3
Verdict: ACCEPTED
input |
---|
100000 374768524402011755 937067109466254318 389256426086302899 932585725667010169 ... |
correct output |
---|
0 1 1 1 1 ... |
user output |
---|
0 1 1 1 1 ... |