Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
349592 胡珂 【C2-4】青蛙爬井 C++ Accepted 100 2 MS 244 KB 221 2025-09-15 19:44:59

Tests(10/10):


#include<iostream> using namespace std; int main(){ int high,up,down,s=0,t=0; cin>>high>>up>>down; while(s<high){ s+=up; t++; if(s>=high){ break; }else{ s-=down; } } cout<<t; return 0; }


Judgement Protocol: