結果
問題 | No.604 誕生日のお小遣い |
ユーザー |
|
提出日時 | 2017-12-04 00:02:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 481 bytes |
コンパイル時間 | 814 ms |
コンパイル使用メモリ | 93,148 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-21 19:13:01 |
合計ジャッジ時間 | 1,590 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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;}