結果
| 問題 | No.3066 Collecting Coins Speedrun 1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-21 16:17:50 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 110 ms / 2,000 ms |
| コード長 | 285 bytes |
| 記録 | |
| コンパイル時間 | 325 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 24,980 KB |
| 最終ジャッジ日時 | 2026-04-21 16:17:57 |
| 合計ジャッジ時間 | 5,839 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 32 |
ソースコード
def main():
n = int(input())
c = list(map(int,input().split()))
maxc = max(c)
minc = min(c)
if minc > 0 and maxc > 0:
minc = 0
if minc < 0 and maxc < 0:
maxc = 0
print(abs(maxc * 2) + abs(minc * 2))
if __name__ == "__main__":
main()