fork(1) download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main()
  5.  
  6. {
  7.  
  8. char str[100000];
  9. char str1[100000];
  10. int i,len,j;
  11.  
  12. scanf("%s",str);
  13. len=strlen(str);
  14.  
  15.  
  16.  
  17. for(i=0;i<len;i++)
  18. {
  19. if(str[i]=='?')
  20. {
  21. j=i;
  22. break;
  23. }
  24. }
  25. for(i=j+1;i<len;i++)
  26. {
  27. if((str[i]>='A' && str[i]<='Z') || (str[i]>='a' && str[i]<='z'))
  28. {
  29. printf("%c",str[i]);
  30. }
  31. else if(str[i]=='&')
  32. {
  33. printf("\n");
  34. }
  35. else if(str[i]=='=')
  36. {
  37. printf(": ");
  38. }
  39. }
  40. return 0;
  41. }
Success #stdin #stdout 0s 4464KB
stdin
http://w...content-available-to-author-only...p.com/signin/service?username=test&pwd=test&profile=developer&role=ELITE&key=manager
stdout
username: test
pwd: test
profile: developer
role: ELITE
key: manager