Submission #1501542
Source Code Expand
read str ary=(`echo $str`) x=${ary[0]} y=${ary[1]} cnt=${cnt:=0} if [ "$y" -lt "$x" ]; then x=$(( $x * -1 )) cnt=$(( $cnt + 1 )) fi while [ "$x" -lt "$y" ] do x=$(( $x + 1 )) cnt=$(( $cnt + 1 )) if [ $(( $x * -1 )) -eq "$y" ]; then cnt=$(( $cnt + 1 )) break fi done echo $cnt
Submission Info
Submission Time | |
---|---|
Task | A - Simple Calculator |
User | KurataKcyb |
Language | Bash (GNU bash v4.3.11) |
Score | 0 |
Code Size | 319 Byte |
Status | WA |
Exec Time | 2103 ms |
Memory | 504 KB |
Judge Result
Set Name | Sample | All | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt |
All | 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | AC | 2 ms | 504 KB |
0_01.txt | AC | 2 ms | 504 KB |
0_02.txt | WA | 2 ms | 504 KB |
1_00.txt | TLE | 2103 ms | 504 KB |
1_01.txt | TLE | 2103 ms | 504 KB |
1_02.txt | WA | 2 ms | 504 KB |
1_03.txt | TLE | 2103 ms | 504 KB |
1_04.txt | TLE | 2103 ms | 504 KB |
1_05.txt | TLE | 2103 ms | 504 KB |
1_06.txt | WA | 2 ms | 504 KB |
1_07.txt | TLE | 2103 ms | 504 KB |
1_08.txt | TLE | 2103 ms | 504 KB |
1_09.txt | TLE | 2103 ms | 504 KB |
1_10.txt | TLE | 2103 ms | 504 KB |