Submission #3604810
Source Code Expand
function Getnum(number1,number2) local intTemp=1; if number2 < number1 then intTemp=number2; number2=number1; number1=intTemp; end while(number1~=0) do intTemp =number2 % number1; number2=number1; number1=intTemp; end return number2; end local n = io.read() local x = io.read() local s = {} local sum = s[1] for i=1,n do a = io.read() s[i] = a>x and a-x or x-a end for i=1,n-1 do sum = Getnum(sum,s[i+1]) end print(sum)
Submission Info
Submission Time | |
---|---|
Task | C - Skip |
User | vjudge5 |
Language | Lua (5.3.2) |
Score | 0 |
Code Size | 443 Byte |
Status | RE |
Exec Time | 4 ms |
Memory | 2296 KB |
Judge Result
Set Name | All | Sample | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 300 | 0 / 0 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
All | hand_1, large_1, large_2, large_3, large_4, large_5, large_6, large_7, large_8, max_1, max_2, max_3, min_1, min_2, sample_01, sample_02, sample_03, small_1, small_2, small_3, small_4, small_5 |
Sample | sample_01, sample_02, sample_03 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
hand_1 | RE | 1 ms | 256 KB |
large_1 | RE | 2 ms | 632 KB |
large_2 | RE | 2 ms | 760 KB |
large_3 | RE | 2 ms | 632 KB |
large_4 | RE | 1 ms | 256 KB |
large_5 | RE | 1 ms | 256 KB |
large_6 | RE | 1 ms | 256 KB |
large_7 | RE | 1 ms | 256 KB |
large_8 | RE | 1 ms | 256 KB |
max_1 | RE | 4 ms | 2296 KB |
max_2 | RE | 4 ms | 2296 KB |
max_3 | RE | 4 ms | 2296 KB |
min_1 | RE | 1 ms | 256 KB |
min_2 | RE | 1 ms | 256 KB |
sample_01 | RE | 1 ms | 256 KB |
sample_02 | RE | 1 ms | 256 KB |
sample_03 | RE | 1 ms | 256 KB |
small_1 | RE | 1 ms | 256 KB |
small_2 | RE | 1 ms | 256 KB |
small_3 | RE | 1 ms | 256 KB |
small_4 | RE | 1 ms | 256 KB |
small_5 | RE | 1 ms | 256 KB |