結果

問題 No.791 うし数列
ユーザー MaboyMaboy
提出日時 2021-06-18 11:01:50
言語 Swift
(5.10.0)
結果
WA  
実行時間 -
コード長 155 bytes
コンパイル時間 3,947 ms
コンパイル使用メモリ 103,008 KB
実行使用メモリ 8,040 KB
最終ジャッジ日時 2023-09-04 00:50:23
合計ジャッジ時間 4,915 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
8,040 KB
testcase_01 AC 3 ms
7,904 KB
testcase_02 AC 3 ms
7,760 KB
testcase_03 AC 3 ms
7,836 KB
testcase_04 AC 3 ms
7,988 KB
testcase_05 AC 3 ms
7,868 KB
testcase_06 AC 4 ms
7,972 KB
testcase_07 WA -
testcase_08 AC 3 ms
7,916 KB
testcase_09 AC 3 ms
7,788 KB
testcase_10 AC 3 ms
7,748 KB
testcase_11 AC 3 ms
7,860 KB
testcase_12 AC 4 ms
7,740 KB
testcase_13 AC 3 ms
7,772 KB
testcase_14 AC 4 ms
7,740 KB
testcase_15 AC 3 ms
7,864 KB
testcase_16 AC 3 ms
7,924 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{
    ans = L.count - 1
}
print(ans)
0