結果
| 問題 | No.1101 鼻水 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-07-03 21:51:07 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 886 bytes | 
| コンパイル時間 | 887 ms | 
| コンパイル使用メモリ | 96,656 KB | 
| 最終ジャッジ日時 | 2025-01-11 14:28:44 | 
| ジャッジサーバーID (参考情報) | judge4 / judge6 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 WA * 4 | 
ソースコード
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <queue>
typedef unsigned long long ULLONG;
typedef long long LLONG;
static const LLONG MOD_NUM = 1000000007;//998244353;
template<class _T> static void getval(_T& a) {
	std::cin >> a;
}
template<class _T> static void getval(_T& a, _T& b) {
	std::cin >> a >> b;
}
template<class _T> static void getval(_T& a, _T& b, _T& c) {
	std::cin >> a >> b >> c;
}
static void exec();
int main()
{
	exec();
	fflush(stdout);
	return 0;
}
static void exec()
{
	LLONG V, T, P;
	getval(V, T, P);
	
	if (P) {
		V = V * (P + 1);
	}
	LLONG rd = V / T;
	LLONG rdtmp = rd;
	while (rdtmp) {
		rdtmp = (rdtmp + V % T) / T;
		rd += rdtmp;
	}
	LLONG ans = V + rd + 1;
	printf("%lld\n", ans);
}
            
            
            
        