結果

問題 No.1268 Fruit Rush 2
ユーザー 👑 KazunKazun
提出日時 2020-10-23 22:24:02
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 198 bytes
コンパイル時間 1,036 ms
コンパイル使用メモリ 86,900 KB
実行使用メモリ 142,820 KB
最終ジャッジ日時 2023-09-28 16:21:58
合計ジャッジ時間 8,733 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,384 KB
testcase_01 AC 73 ms
71,388 KB
testcase_02 AC 71 ms
71,028 KB
testcase_03 AC 72 ms
71,228 KB
testcase_04 AC 71 ms
71,024 KB
testcase_05 AC 72 ms
71,308 KB
testcase_06 AC 72 ms
71,320 KB
testcase_07 AC 72 ms
71,484 KB
testcase_08 AC 71 ms
71,384 KB
testcase_09 AC 72 ms
71,104 KB
testcase_10 AC 72 ms
71,224 KB
testcase_11 AC 72 ms
71,176 KB
testcase_12 AC 72 ms
71,260 KB
testcase_13 AC 71 ms
71,208 KB
testcase_14 AC 71 ms
71,224 KB
testcase_15 AC 72 ms
71,248 KB
testcase_16 AC 179 ms
123,384 KB
testcase_17 AC 136 ms
117,000 KB
testcase_18 AC 138 ms
117,688 KB
testcase_19 AC 139 ms
117,428 KB
testcase_20 AC 141 ms
117,600 KB
testcase_21 AC 143 ms
117,512 KB
testcase_22 AC 156 ms
123,112 KB
testcase_23 AC 152 ms
123,164 KB
testcase_24 AC 141 ms
117,664 KB
testcase_25 AC 137 ms
117,276 KB
testcase_26 AC 168 ms
130,724 KB
testcase_27 AC 166 ms
130,832 KB
testcase_28 AC 168 ms
130,800 KB
testcase_29 AC 171 ms
130,888 KB
testcase_30 AC 170 ms
130,960 KB
testcase_31 TLE -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
B=set(A)

X=N
for a in A:
    if a+1 in B:
        X+=1
    else:
        continue

    b=a+1
    while b+2 in B:
        X+=1
        b+=2

print(X)
0