#include <iostream>
using namespace std;
struct Node{
int data;
Node* pNext;
};
void inputLL(Node* &pHead)
{
Node* cur = pHead;
int x;
cout << "Please input the number: "; cin>>x;
while(x != 0) {
if(pHead == nullptr) {
pHead = new Node;
cur = pHead;
} else {
cur->pNext = new Node;
cur = cur->pNext;
}
cur->data = x;
cur->pNext = nullptr;
cout << "Please input the number: "; cin>>x;
}
}
int main() {}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RydWN0IE5vZGV7CiAgICBpbnQgZGF0YTsKICAgIE5vZGUqIHBOZXh0Owp9OwoKdm9pZCBpbnB1dExMKE5vZGUqICZwSGVhZCkgCnsgICAKCU5vZGUqIGN1ciA9IHBIZWFkOwogICAgaW50IHg7CiAgICAKICAgIGNvdXQgPDwgIlBsZWFzZSBpbnB1dCB0aGUgbnVtYmVyOiAiOyBjaW4+Png7CiAgICB3aGlsZSh4ICE9IDApIHsKICAgICAgICBpZihwSGVhZCA9PSBudWxscHRyKSB7CiAgICAgICAgICAgIHBIZWFkID0gbmV3IE5vZGU7CiAgICAgICAgICAgIGN1ciA9IHBIZWFkOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGN1ci0+cE5leHQgPSBuZXcgTm9kZTsKICAgICAgICAgICAgY3VyID0gY3VyLT5wTmV4dDsKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgY3VyLT5kYXRhID0geDsKICAgICAgICBjdXItPnBOZXh0ID0gbnVsbHB0cjsKICAgICAgICBjb3V0IDw8ICJQbGVhc2UgaW5wdXQgdGhlIG51bWJlcjogIjsgY2luPj54OwogICAgfQp9CgppbnQgbWFpbigpIHt9