結果

問題 No.1486 ロボット
ユーザー Mr_uts1_quizer
提出日時 2021-04-23 21:39:07
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 286 bytes
コンパイル時間 1,509 ms
コンパイル使用メモリ 166,932 KB
実行使用メモリ 173,876 KB
最終ジャッジ日時 2024-07-04 07:45:33
合計ジャッジ時間 4,856 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 TLE * 1
other -- * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c,d,e;
  cin >> a >> b >> c >> d >> e;
  int count=0;
  for(int i=0;i<e;i++){
    if((i+1) % (a+b) <= a && (i+1) % (c+d) <= c && (i+1) % (a+b) != 0 && (i+1) % (c+d) != 0){
      count++;
    }
  }
  cout << count;
}
0