結果
| 問題 |
No.604 誕生日のお小遣い
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-22 21:58:45 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 344 bytes |
| コンパイル時間 | 681 ms |
| コンパイル使用メモリ | 54,500 KB |
| 実行使用メモリ | 13,640 KB |
| 最終ジャッジ日時 | 2024-12-17 23:29:53 |
| 合計ジャッジ時間 | 9,880 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 11 WA * 6 TLE * 4 |
ソースコード
#include <iostream>
using namespace std;
typedef long long LL;
int main(int argc, char* argv[])
{
LL A,B,C;
cin>>A>>B>>C;
if (C<A){
cout<<C<<endl;
return 0;
}
LL year=A-1;
LL money=0;
while(true){
if (year%A==0){
money+=B;
}else{
money++;
}
if (money>=C){
cout<<year<<endl;
return 0;
}
year++;
}
return 0;
}