結果

問題 No.604 誕生日のお小遣い
ユーザー ohreitetsu
提出日時 2017-12-22 22:32:28
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 475 bytes
コンパイル時間 644 ms
コンパイル使用メモリ 55,624 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-17 23:49:52
合計ジャッジ時間 1,363 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
typedef long long LL;
int main(int argc, char* argv[])
{
	LL A,B,C;
	cin>>A>>B>>C;
	LL X=C/(A-1+B);
	LL Y=C%(A-1+B);
	cout<<A*X+Y<<endl;
	/*
	if (C<A){
		cout<<C<<endl;
		return 0;
	}
	LL year=0;
	LL money=0;
	while(true){
		if (money+A-1<=C){
			year+=A-1;
			money+=A-1;
		}else{
			
		}
		if (year%A==0){
			money+=B;
		}else{
			money++;
		}
		if (money>=C){
			cout<<year<<endl;
			return 0;
		}


			year++;

	}
	*/
	return 0;
}
0