#include <iostream>
using namespace std;
struct Node {
int data;
Node* next;
};
int main() {
Node *head,*p,*r;
head = new Node;
r=head;
cin>>head->data;
int x=head->data;
int t;
while(x>0) {
p=new Node;
cin>>t;
p->data=t;
p->next=nullptr;
r->next=p;
r=p;
x--;
}
while(p->next!=nullptr) {
cout<<p->data<<" ";
p=p->next;
}
return 0;
}
不喜勿喷,谢谢各位大佬(毕竟就我一个小学生怎么能比得过各位高材生)