結果

問題 No.791 うし数列
ユーザー MaboyMaboy
提出日時 2021-06-18 11:04:07
言語 Swift
(5.10.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 171 bytes
コンパイル時間 581 ms
コンパイル使用メモリ 103,208 KB
実行使用メモリ 8,000 KB
最終ジャッジ日時 2023-09-04 00:53:16
合計ジャッジ時間 1,552 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
8,000 KB
testcase_01 AC 3 ms
7,880 KB
testcase_02 AC 3 ms
7,888 KB
testcase_03 AC 3 ms
7,848 KB
testcase_04 AC 4 ms
7,868 KB
testcase_05 AC 3 ms
7,848 KB
testcase_06 AC 4 ms
7,860 KB
testcase_07 AC 3 ms
7,892 KB
testcase_08 AC 4 ms
7,916 KB
testcase_09 AC 3 ms
7,912 KB
testcase_10 AC 3 ms
7,908 KB
testcase_11 AC 3 ms
7,780 KB
testcase_12 AC 3 ms
7,928 KB
testcase_13 AC 4 ms
7,920 KB
testcase_14 AC 3 ms
7,828 KB
testcase_15 AC 3 ms
7,808 KB
testcase_16 AC 3 ms
7,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

let E = readLine()!
var L = Array(E)//.map{String($0)}
var S = Set(L[1...])
var ans = -1
if L[0] == "1" && S.count == 1 && L[1] == "3"{
    ans = L.count - 1
}
print(ans)
0