結果
| 問題 | No.604 誕生日のお小遣い |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-04 00:02:07 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 481 bytes |
| 記録 | |
| コンパイル時間 | 677 ms |
| コンパイル使用メモリ | 107,180 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-15 23:02:32 |
| 合計ジャッジ時間 | 1,669 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "iomanip"
#include "cmath"
using namespace std;
const long long int MOD = 1000000007;
long long int N, M, K, H, W, L, R;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cin >> N >> M >> K;
L = K / (M + N - 1);
L *= N;
cout << L + min(N,K % (M + N - 1)) << endl;
return 0;
}