竞赛
考级
#include<iostream> #include<cstring> using namespace std; int main(){ int n; cin >> n; string a,b,c; b = "123"; a = "4567"; c = b+a; while(c.size()<n){ a = b; b = c; c = b + a; } cout << c[n-1]; return 0; }
T0
共22条