結果
問題 |
No.604 誕生日のお小遣い
|
ユーザー |
![]() |
提出日時 | 2020-03-02 16:19:42 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 296 bytes |
コンパイル時間 | 1,354 ms |
コンパイル使用メモリ | 167,352 KB |
実行使用メモリ | 13,636 KB |
最終ジャッジ日時 | 2024-10-13 21:14:11 |
合計ジャッジ時間 | 4,246 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 8 WA * 4 TLE * 1 -- * 8 |
ソースコード
#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; }