結果
問題 |
No.3066 Collecting Coins Speedrun 1
|
ユーザー |
|
提出日時 | 2025-04-28 12:05:01 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 72 ms / 2,000 ms |
コード長 | 287 bytes |
コンパイル時間 | 517 ms |
コンパイル使用メモリ | 82,236 KB |
実行使用メモリ | 87,132 KB |
最終ジャッジ日時 | 2025-04-28 12:05:05 |
合計ジャッジ時間 | 4,446 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
ソースコード
import sys def input(): return sys.stdin.readline().strip() def main(): input() (*c,) = map(int, input().split()) if c[0] * c[-1] >= 0: print(max(abs(c[0]), abs(c[-1])) * 2) else: print((c[-1] - c[0]) * 2) if __name__ == "__main__": main()