Size: a a a

2020 October 16

PR

Prathmesh Raut in pro.lua
How many changes
источник

PR

Prathmesh Raut in pro.lua
Plz
источник

S

Snusmumriken in pro.lua
I'm bored to rewrite it in pure Lua.
источник

PR

Prathmesh Raut in pro.lua
What's change plz
источник

S

Snusmumriken in pro.lua
Лол, такой булшит использовать ффи для такой фигни.
источник

PR

Prathmesh Raut in pro.lua
Could you write it in notebook then share plz
источник

PR

Prathmesh Raut in pro.lua
Plz only last plz
источник

S

Snusmumriken in pro.lua
Prathmesh Raut
Could you write it in notebook then share plz
local case, count

while not case do
 print("Write testcase count (number):")
 case = tonumber(io.read("*l"))
end

while not count do
 print("Write students count (number):")
 count = tonumber(io.read("*l"))
end

local coolest = {name = "", score = -math.huge}

for i = 1, count do
 local studentname, score
 while not studentname do
   print("Write " .. i .. " student (name score):")
   local line = io.read("*l")
   studentname, score = line:match("(%w+).-(%-?%d+%.?%d*)")
   if studentname then
     score = tonumber(score)
     print("Student #" .. i .. ": ", studentname, "score: ", score)
     if score > coolest.score then
       coolest.name = studentname
       coolest.score = score
     end      
   end
 end
end

print("Coolest student is ", coolest.name, ", he's score is:", coolest.score)
источник

PR

Prathmesh Raut in pro.lua
Thx you very much
источник

S

Snusmumriken in pro.lua
Prathmesh Raut
Thx you very much
This is very typical task. Why you do not google it?
источник

PR

Prathmesh Raut in pro.lua
I was searched but not get
источник

S

Snusmumriken in pro.lua
Why do you need ffi for it?
источник

S

Snusmumriken in pro.lua
Prathmesh Raut
I was searched but not get
Also why Lua? Why not python, java/javascript, C etc?
источник

PR

Prathmesh Raut in pro.lua
Actually currently learning lua
источник

S

Snusmumriken in pro.lua
Prathmesh Raut
Actually currently learning lua
For what?
источник

PR

Prathmesh Raut in pro.lua
On codechef coding platform
источник

PR

Prathmesh Raut in pro.lua
Can we solve this by table as input in lua
источник

S

Snusmumriken in pro.lua
Prathmesh Raut
Can we solve this by table as input in lua
No-no. Any language is a tool for specific tasks.
You should learn for specific tasks. Learning for learning is a no way.
источник

S

Snusmumriken in pro.lua
Prathmesh Raut
Can we solve this by table as input in lua
So what do you need Lua for? What tasks are you planning to do?
источник

PR

Prathmesh Raut in pro.lua
But here input in one line how to do
источник