結果
問題 |
No.139 交差点
|
ユーザー |
![]() |
提出日時 | 2020-06-11 21:42:19 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 280 bytes |
コンパイル時間 | 164 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-24 03:21:51 |
合計ジャッジ時間 | 2,306 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 19 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() n,l=map(int,input().split()) ans=0 cur=0 for _ in range(n): x,w,t=map(int,input().split()) ans+=x-cur cur=x if (ans//t)%2==0 and ((ans+w)//t)%2==0: continue else: ans=((ans+w-1)//t//2+1)*2*t print(ans+l-cur)