Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,29 @@
|
|||
filename = "mlijobs.txt"
|
||||
io.input( filename )
|
||||
|
||||
max_out, n_out = 0, 0
|
||||
occurr_dates = {}
|
||||
|
||||
while true do
|
||||
line = io.read( "*line" )
|
||||
if line == nil then break end
|
||||
|
||||
if string.find( line, "OUT" ) ~= nil then
|
||||
n_out = n_out + 1
|
||||
if n_out > max_out then
|
||||
max_out = n_out
|
||||
occurr_dates = {}
|
||||
occurr_dates[#occurr_dates+1] = string.match( line, "@ ([%d+%p]+)" )
|
||||
elseif n_out == max_out then
|
||||
occurr_dates[#occurr_dates+1] = string.match( line, "@ ([%d+%p]+)" )
|
||||
end
|
||||
else
|
||||
n_out = n_out - 1
|
||||
end
|
||||
end
|
||||
|
||||
print( "Maximum licenses in use:", max_out )
|
||||
print( "Occurrences:" )
|
||||
for i = 1, #occurr_dates do
|
||||
print( "", occurr_dates[i] )
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue