#include <iostream> using namespace std; int main() { int n,i; int a[21]; while(cin>>n) { for ( i=0;i<n;i++) { cin>>a[i]; } int m,t; cin>>m; for ( i=0;i<n;i++) { if (m==a[i]) break; else cout<<a[i]<<" "; } for ( t=i+1;t<n;t++) cout<<a[t]<<" "; } return 0; }
全部评论
(1) 回帖