Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
59727 余慕涵 14兔子问题 C++ Accepted 0 MS 272 KB 332 2023-11-03 20:14:32

Tests(1/1):


Code:

#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main(){ int s=1; int yt=0,ct=0,xt=0,y=1,c=0,x=0; while(s<=8){ yt=c+x; xt=y; ct=c+x; y=yt; x=xt; c=ct; s++; } cout<<yt<<" "<<xt<<" "<<ct; return 0; }