結果
問題 |
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, sugar const inf = "INF" proc isKadomatsu(xs: seq[int]): bool = let x = xs[0] y = xs[1] z = xs[2] if x == z: return false if x < y and y > z: return true if x > y and y < z: return true false let a = stdin.readLine.split.map parseInt if a.isKadomatsu: echo inf quit() let list = newSeq.collect: for i in 3 .. a.max: if a.mapIt(it mod i).isKadomatsu: i echo list.len