結果
| 問題 | No.604 誕生日のお小遣い | 
| コンテスト | |
| ユーザー |  tnakao0123 | 
| 提出日時 | 2017-12-04 20:13:44 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 674 bytes | 
| コンパイル時間 | 711 ms | 
| コンパイル使用メモリ | 84,572 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-21 19:18:38 | 
| 合計ジャッジ時間 | 1,265 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 | 
ソースコード
/* -*- coding: utf-8 -*-
 *
 * 604.cc: No.604 誕生日のお小遣い - yukicoder
 */
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;
/* constant */
/* typedef */
typedef long long ll;
/* global variables */
/* subroutines */
/* main */
int main() {
  ll a, b, c;
  cin >> a >> b >> c;
  ll d = b + a - 1;
  printf("%lld\n", c / d * a + ((c % d >= a) ? a : c % d));
  return 0;
}
            
            
            
        