結果

問題 No.604 誕生日のお小遣い
ユーザー mnrmnr
提出日時 2020-03-02 16:19:42
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 296 bytes
コンパイル時間 1,594 ms
コンパイル使用メモリ 161,404 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-21 22:47:32
合計ジャッジ時間 4,587 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

int main() {
  int A; int B; int C;
  cin >> A >> B >> C;
  int sum = 0;
  int age = 1;
  while (sum < C) {
    if (age % A == 0) {
      sum += B;
      age += 1;
    }
    else {
      sum += 1;
      age += 1;
    }
  }
  cout << age-1 << endl;
}
0