Submission #00007


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,day=0,ans=0;
cin>>a>>b>>c;
while(true){
day++;
ans+=b;
if(ans>=a){
cout<<day<<"\n";
return 0;
}
ans-=c;
}
}

ステータス

項目 データ
問題 0004 - パンケーキの水やり
ユーザー名 r2135
投稿日時 2022-11-15 20:43:10
言語 C++17
状態 Accepted
得点 1
ソースコード長 268 Byte
最大実行時間 26 ms
最大メモリ使用量 488 KB

セット

セット 得点 Cases
1 ALL 1 / 1 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
input01.txt AC 26 ms 476 KB
1
input02.txt AC 23 ms 448 KB
1
input03.txt AC 22 ms 292 KB
1
input04.txt AC 22 ms 396 KB
1
input05.txt AC 24 ms 488 KB
1