結果
問題 | No.358 も~っと!門松列 |
ユーザー |
![]() |
提出日時 | 2024-12-19 17:06:47 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 441 bytes |
コンパイル時間 | 5,073 ms |
コンパイル使用メモリ | 66,424 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-19 17:06:53 |
合計ジャッジ時間 | 5,700 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
import sequtils, strutils, sugarconstinf = "INF"proc isKadomatsu(xs: seq[int]): bool =letx = xs[0]y = xs[1]z = xs[2]if x == z: return falseif x < y and y > z: return trueif x > y and y < z: return truefalseleta = stdin.readLine.split.map parseIntif a.isKadomatsu:echo infquit()letlist = newSeq.collect:for i in 3 .. a.max:if a.mapIt(it mod i).isKadomatsu: iecho list.len