Skip to main content
formatting
Source Link
Adám
  • 31.1k
  • 3
  • 124
  • 287

APL (Dyalog Unicode), 51 bytes

Full program body.

s←⎕AI
1↓∊':'@1∘⍕¨100+3↑0 60 60 1E3⊤3⊃⎕AI-s
⎕DL 1
→2

Try it online! (Press Ctrl+Enter to start, and again to stop.)

⎕AIAccount Information (user ID, compute time, connect time, keying time)

s← assign to s (for start time)

  
⎕AI-s subtract s from ⎕AI

3⊃ pick the third element (connect time in milliseconds)

  
0 60 60 1E3⊤ convert to this mixed-radix

  
3↑ take the first 3 (drops the milliseconds)

  
100+ one hundred added to each (to pad zeros)

  
':'@1∘⍕¨ amend with a colon at the first character of the string representation of each

  
ϵnlist (flatten)

  
1↓ drop the first colon (and implicitly print to stdout)

⎕DL 1Delay one second

→2 go to line number two

APL (Dyalog Unicode), 51 bytes

s←⎕AI
1↓∊':'@1∘⍕¨100+3↑0 60 60 1E3⊤3⊃⎕AI-s
⎕DL 1
→2

Try it online! (Press Ctrl+Enter to start, and again to stop.)

⎕AIAccount Information (user ID, compute time, connect time, keying time)

s← assign to s (for start time)

 ⎕AI-s subtract s from ⎕AI

3⊃ pick the third element (connect time in milliseconds)

 0 60 60 1E3⊤ convert to this mixed-radix

 3↑ take the first 3 (drops the milliseconds)

 100+ one hundred added to each (to pad zeros)

 ':'@1∘⍕¨ amend with a colon at the first character of the string representation of each

 ϵnlist (flatten)

 1↓ drop the first colon

⎕DLDelay one second

→2 go to line number two

APL (Dyalog Unicode), 51 bytes

Full program body.

s←⎕AI
1↓∊':'@1∘⍕¨100+3↑0 60 60 1E3⊤3⊃⎕AI-s
⎕DL 1
→2

Try it online! (Press Ctrl+Enter to start, and again to stop.)

⎕AIAccount Information (user ID, compute time, connect time, keying time)

s← assign to s (for start time) 
⎕AI-s subtract s from ⎕AI

3⊃ pick the third element (connect time in milliseconds) 
0 60 60 1E3⊤ convert to this mixed-radix 
3↑ take the first 3 (drops the milliseconds) 
100+ one hundred added to each (to pad zeros) 
':'@1∘⍕¨ amend with a colon at the first character of the string representation of each 
ϵnlist (flatten) 
1↓ drop the first colon (and implicitly print to stdout)

⎕DL 1Delay one second

→2 go to line number two

added 48 characters in body
Source Link
Adám
  • 31.1k
  • 3
  • 124
  • 287

APL (Dyalog Unicode), 51 bytes

s←⎕AI
1↓∊':'@1∘⍕¨100+3↑0 60 60 1E3⊤3⊃⎕AI-s
⎕DL 1
→2

Try it online! (Press Ctrl+Enter to start, and again to stop.)

⎕AIAccount Information (user ID, compute time, connect time, keying time)

s← assign to s (for start time)

⎕AI-s subtract s from ⎕AI

3⊃ pick the third element (connect time in milliseconds)

0 60 60 1E3⊤ convert to this mixed-radix

3↑ take the first 3 (drops the milliseconds)

100+ one hundred added to each (to pad zeros)

':'@1∘⍕¨ amend with a colon at the first character of the string representation of each

ϵnlist (flatten)

1↓ drop the first colon

⎕DLDelay one second

→2 go to line number two

APL (Dyalog Unicode), 51 bytes

s←⎕AI
1↓∊':'@1∘⍕¨100+3↑0 60 60 1E3⊤3⊃⎕AI-s
⎕DL 1
→2

Try it online!

⎕AIAccount Information (user ID, compute time, connect time, keying time)

s← assign to s (for start time)

⎕AI-s subtract s from ⎕AI

3⊃ pick the third element (connect time in milliseconds)

0 60 60 1E3⊤ convert to this mixed-radix

3↑ take the first 3 (drops the milliseconds)

100+ one hundred added to each (to pad zeros)

':'@1∘⍕¨ amend with a colon at the first character of the string representation of each

ϵnlist (flatten)

1↓ drop the first colon

⎕DLDelay one second

→2 go to line number two

APL (Dyalog Unicode), 51 bytes

s←⎕AI
1↓∊':'@1∘⍕¨100+3↑0 60 60 1E3⊤3⊃⎕AI-s
⎕DL 1
→2

Try it online! (Press Ctrl+Enter to start, and again to stop.)

⎕AIAccount Information (user ID, compute time, connect time, keying time)

s← assign to s (for start time)

⎕AI-s subtract s from ⎕AI

3⊃ pick the third element (connect time in milliseconds)

0 60 60 1E3⊤ convert to this mixed-radix

3↑ take the first 3 (drops the milliseconds)

100+ one hundred added to each (to pad zeros)

':'@1∘⍕¨ amend with a colon at the first character of the string representation of each

ϵnlist (flatten)

1↓ drop the first colon

⎕DLDelay one second

→2 go to line number two

-1 and explanation
Source Link
Adám
  • 31.1k
  • 3
  • 124
  • 287

APL (Dyalog Unicode), 5251 bytes

s←⎕AI
1↓∊':'@1∘⍕¨100+3↑0 60 60 1000⊤3⊃⎕AI1E3⊤3⊃⎕AI-s
⎕DL 1
→2

Try it online!Try it online!

⎕AIAccount Information (user ID, compute time, connect time, keying time)

s← assign to s (for start time)

⎕AI-s subtract s from ⎕AI

3⊃ pick the third element (connect time in milliseconds)

0 60 60 1E3⊤ convert to this mixed-radix

3↑ take the first 3 (drops the milliseconds)

100+ one hundred added to each (to pad zeros)

':'@1∘⍕¨ amend with a colon at the first character of the string representation of each

ϵnlist (flatten)

1↓ drop the first colon

⎕DLDelay one second

→2 go to line number two

APL (Dyalog Unicode), 52 bytes

s←⎕AI
1↓∊':'@1∘⍕¨100+3↑0 60 60 1000⊤3⊃⎕AI-s
⎕DL 1
→2

Try it online!

APL (Dyalog Unicode), 51 bytes

s←⎕AI
1↓∊':'@1∘⍕¨100+3↑0 60 60 1E3⊤3⊃⎕AI-s
⎕DL 1
→2

Try it online!

⎕AIAccount Information (user ID, compute time, connect time, keying time)

s← assign to s (for start time)

⎕AI-s subtract s from ⎕AI

3⊃ pick the third element (connect time in milliseconds)

0 60 60 1E3⊤ convert to this mixed-radix

3↑ take the first 3 (drops the milliseconds)

100+ one hundred added to each (to pad zeros)

':'@1∘⍕¨ amend with a colon at the first character of the string representation of each

ϵnlist (flatten)

1↓ drop the first colon

⎕DLDelay one second

→2 go to line number two

Source Link
Adám
  • 31.1k
  • 3
  • 124
  • 287
Loading