結果
| 問題 |
No.182 新規性の虜
|
| コンテスト | |
| ユーザー |
バカらっく
|
| 提出日時 | 2018-03-02 11:08:39 |
| 言語 | Swift (6.0.3) |
| 結果 |
AC
|
| 実行時間 | 75 ms / 5,000 ms |
| コード長 | 384 bytes |
| コンパイル時間 | 1,229 ms |
| コンパイル使用メモリ | 136,288 KB |
| 実行使用メモリ | 14,504 KB |
| 最終ジャッジ日時 | 2024-11-30 12:01:16 |
| 合計ジャッジ時間 | 3,512 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
let inputCount = Int(readLine()!)!
let numList = readLine()!.split(separator: " ").map{Int($0)!}.sorted()
var ans = 0
for i in 0..<numList.count {
var isUnq = true
if( i > 0 && numList[i-1] == numList[i]) {
isUnq = false
}
if(i < numList.count-1 && numList[i] == numList[i+1]) {
isUnq = false
}
if(isUnq) {
ans+=1
}
}
print(ans)
バカらっく