結果

問題 No.1486 ロボット
ユーザー ooaiu
提出日時 2025-08-18 10:40:48
言語 cLay
(20241019-1)
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 220 bytes
コンパイル時間 2,173 ms
コンパイル使用メモリ 185,260 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-08-18 10:40:52
合計ジャッジ時間 3,504 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@(A,B,C,D,E);ll t=lcm(A+B,C+D);int f=0,g=0;ll s=0;rep(i,t){if(i%(A+B)<A)f=1;else f=0;if(i%(C+D)<C)g=1;else g=0;s+=f&&g;}ll ans=E/t*s;E%=t;rep(i,E){if(i%(A+B)<A)f=1;else f=0;if(i%(C+D)<C)g=1;else g=0;ans+=f&&g;}wt(ans);
0