竞赛
考级
#include<iostream> using namespace std; int main(){ int n,m,k=0; cin>>n>>m; while(n>=m){ n-=m; m+=1; k+=1; } cout<<k; return 0; }
人机猫
???
每天i++,i++了几次就是几天
朱朗枫
༺ཌༀ◎真仙◎ༀད༻
#include <iostream> using namespace std; int main() { int n,m; cin >> n >> m; int sum = 0; int day = 0; while(sum + m <= n ){ sum += m; day++; m++; } cout << day; return 0; }
liuchengyue hhh
#include"iostream" using namespace std; int main(){ int n,m,s=0; cin>>n>>m; while(n>=m){ n=n-m; m=m+1; s++; } cout<<s; return 0; }
你还好吗
提交答案之后,这里将显示提交结果~