結果

問題 No.139 交差点
ユーザー roiti46
提出日時 2015-01-30 01:15:28
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 248 bytes
コンパイル時間 371 ms
コンパイル使用メモリ 7,204 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-23 04:23:14
合計ジャッジ時間 1,826 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 5 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

N,L = map(int,raw_input().split())
t = l = 0
for loop in range(N):
    X,W,T = map(int,raw_input().split())
    t += X-l
    if t/T%2 == 0 and (t+W-1)/T-t/T:
            t += (T-t%T)+T
    else:
        t += T-t%T
    t += W
    l = X+W
print t+L-l
0