結果

問題 No.1453 手助け
ユーザー kotamanegikotamanegi
提出日時 2021-11-01 17:40:41
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,284 bytes
コンパイル時間 2,308 ms
コンパイル使用メモリ 160,768 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-18 15:05:02
合計ジャッジ時間 3,265 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 1 ms
6,944 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 1 ms
6,944 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 1 ms
6,940 KB
testcase_23 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;

typedef string::const_iterator State;
#define eps 1e-8L
#define MAX_MOD 1000000007LL
#define GYAKU 500000004LL
#define MOD 998244353LL
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef long double ld;
#define REP(a, b) for (long long(a) = 0; (a) < (b); ++(a))
#define ALL(x) (x).begin(), (x).end()

#define int long long
void solve()
{
  int a, b, c, d, e;
  cin >> a >> b >> c >> d >> e;
  int ans = 0;
  int back = 0;
  for (int i = 1; i <= b - c; i++)
  {
    if(i == 1){
      ans += d;
      back = d;
      continue;
    }
    if(i % 10 != 0){
      ans += back;
      continue;
    }
    if(e <= back){
      ans += back - e;
      back = back - e;
    }else{
      ans += back;
      back = back;
    }
  }
  cout << ans << endl;
}
#undef int

// generated by oj-template v4.7.2
// (https://github.com/online-judge-tools/template-generator)
int main()
{
  // Fasterize input/output script
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << fixed << setprecision(100);
  // scanf/printf user should delete this fasterize input/output script

  int t = 1;
  // cin >> t; // comment out if solving multi testcase
  for (int testCase = 1; testCase <= t; ++testCase)
  {
    solve();
  }
  return 0;
}
0