結果

問題 No.32 貯金箱の憂鬱
ユーザー pyraninepyranine
提出日時 2020-12-14 18:45:21
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 721 bytes
コンパイル時間 1,485 ms
コンパイル使用メモリ 165,912 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 05:08:57
合計ジャッジ時間 2,154 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

using i8 = int8_t; using u8 = uint8_t; using i16 = int16_t; using u16 = uint16_t; using i32 = int32_t; using u32 = uint32_t; using i64 = int64_t; using u64 = uint64_t; using i128 = __int128_t; using u128 = __uint128_t; using f32 = float; using f64 = double;

#define cauto const auto&
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
#define ALL(x) (x).begin(),(x).end()

int main() {
  int L, M, N;
  cin >> L >> M >> N;
  if (N >= 25) {
    M += N / 25;
    N %= 25;
  }
  if (M >= 4) {
    L += M / 4;
    M %= 4;
  }
  if (L >= 10) {
    L %= 10;
  }
  printf("%d\n", L + M + N);
  return 0;
}
0