Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //http://br.spoj.com/problems/POODLEMG/
- #include <stdio.h>
- int main(void) {
- int n,p,a,b,c;
- while(scanf("%d %d",&n,&p)!=EOF && n>0 && p>0 && n<=1000000 && p<=100){
- a=n-(n%p);
- b=a/p+1;
- c=b-4;
- printf("P");
- if(c>=20)
- c=c-(c-16);
- else if(c<=2)
- c=2;
- //printf("n:%d pagina:%d o'\s:%d\n",n,b,c);
- while(c--)
- printf("o");
- printf("dle\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement