結果
| 問題 |
No.1285 ゴミ捨て
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-23 22:21:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 233 bytes |
| コンパイル時間 | 200 ms |
| コンパイル使用メモリ | 81,708 KB |
| 実行使用メモリ | 92,248 KB |
| 最終ジャッジ日時 | 2024-07-23 18:00:43 |
| 合計ジャッジ時間 | 5,005 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 TLE * 1 -- * 16 |
ソースコード
from decimal import *
import math
n = int(input())
A = []
count = 1
for i in range(n):
A.append(int(input()))
for i in range(n):
for j in range(i+1,n):
if abs(A[i] - A[j]) < 2:
count += 1
print(count)