結果
問題 |
No.604 誕生日のお小遣い
|
ユーザー |
![]() |
提出日時 | 2018-07-11 21:23:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 243 bytes |
コンパイル時間 | 378 ms |
コンパイル使用メモリ | 55,556 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-21 19:24:43 |
合計ジャッジ時間 | 1,119 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <iostream> using namespace std; int main(){ long long int a,b,c,money,age; cin>>a>>b>>c; money = 0; age = a*(c/(a+b-1)); c = c%(a+b-1); if(c<=a-1)age+=c; else age+=a; cout<<age<<endl; }