Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
- #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
- #pragma comment(linker, "/stack:200000000")
- #include<ios>
- char buf[1<<20],*p1=buf,*p2=buf;
- inline int getc(){
- return p1==p2&&(p2=(p1=buf)+fread_unlocked(buf,1,1<<20,stdin),p1==p2)?EOF:*p1++;
- }
- inline void write(uint_fast16_t x){
- static int stk[6],top=0;
- int *ptr;
- ptr=&stk[0];
- while(x){*ptr=x%10;x/=10;ptr++;}
- ptr--;
- while(ptr>=(&stk[0])){putchar_unlocked(*ptr+'0');ptr--;}
- }
- inline int read(){
- uint_fast16_t ret=0;
- char ch=getc();
- while(ch>='0'&&ch<='9')
- ret=(ret<<1)+(ret<<3)+ch-'0',ch=getc();
- return ret;
- }
- int main(){
- uint_fast16_t a;
- while(a=read()){
- for(int i=a-1;i>=1;--i){
- write(read()*i);
- putchar_unlocked(' ');
- }
- redn();
- if(a==1)putchar_unlocked('0');
- putchar_unlocked('\n');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement