結果
問題 | No.358 も~っと!門松列 |
ユーザー |
👑 |
提出日時 | 2019-04-06 23:16:53 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 463 bytes |
コンパイル時間 | 141 ms |
コンパイル使用メモリ | 5,376 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-25 03:07:42 |
合計ジャッジ時間 | 1,148 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
a,b,c=io.read("*n","*n","*n")if(a < b and c < b and a ~= c) then print("INF")elseif(a > b and c > b and a ~= c) then print("INF")elseif(a == b or b == c or c == a) then print(0)elsecnt = 0m = math.max(math.max(a,b),c)for i = 1, m doas, bs, cs = a % i, b % i, c % iif(as > bs and cs > bs and as ~= cs) then cnt = cnt + 1elseif(as < bs and cs < bs and as ~= cs) then cnt = cnt + 1endendprint(cnt)end