結果
| 問題 |
No.3084 Identify f(x)
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 20:45:32 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 380 bytes |
| コンパイル時間 | 264 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 76,416 KB |
| 最終ジャッジ日時 | 2025-06-12 20:45:46 |
| 合計ジャッジ時間 | 6,820 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 6 |
ソースコード
def main():
import sys
input = sys.stdin.read().split()
N = int(input[0])
A = list(map(int, input[1:N+1]))
current = 0
for a in A:
if a == 0:
current = 0
elif a == 1:
current += 1
else:
current += 3 + 1*(current//1) if current else 4
print(current)
if __name__ == "__main__":
main()
gew1fw