結果
問題 | No.604 誕生日のお小遣い |
ユーザー |
![]() |
提出日時 | 2017-12-06 00:53:03 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 341 bytes |
コンパイル時間 | 569 ms |
コンパイル使用メモリ | 72,688 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 19:19:26 |
合計ジャッジ時間 | 1,357 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cstdio> #include <cstring> #include <cmath> using namespace std; int main() { int64_t a, b, c; cin >> a >> b >> c; int64_t x = a - 1 + b; int64_t y = c / x; int64_t z = c % x; cout << y * a + min(z, a) << endl; return 0; }