結果

問題 No.739 大事なことなので2度言います
ユーザー MaboyMaboy
提出日時 2021-06-17 17:41:41
言語 Swift
(5.10.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 249 bytes
コンパイル時間 5,166 ms
コンパイル使用メモリ 101,948 KB
実行使用メモリ 7,048 KB
最終ジャッジ日時 2023-08-31 01:09:02
合計ジャッジ時間 6,198 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
6,968 KB
testcase_01 AC 3 ms
6,988 KB
testcase_02 AC 3 ms
6,980 KB
testcase_03 AC 3 ms
6,984 KB
testcase_04 AC 3 ms
6,972 KB
testcase_05 AC 3 ms
7,048 KB
testcase_06 AC 3 ms
6,892 KB
testcase_07 AC 3 ms
7,044 KB
testcase_08 AC 3 ms
6,952 KB
testcase_09 AC 3 ms
7,040 KB
testcase_10 AC 3 ms
6,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

let S = readLine()!
var c = S.count
let s0 = S[S.index(S.startIndex, offsetBy: 0)...S.index(S.startIndex, offsetBy: c / 2 - 1)]
let s1 = S[S.index(S.startIndex, offsetBy: c / 2)...S.index(S.startIndex, offsetBy: c-1)]
print(s0 == s1 ? "YES" : "NO")
0