Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int test,a,b,i=1,c;
- scanf("%d", &test);
- while(test--)
- {
- scanf("%d %d", &a ,&b);
- c=1;
- printf("c=%d",c);
- for(int j=1;j<=a;j++)
- {
- if(a%j==b)
- {
- if(c==1)
- {
- printf("Case %d: %d",i,j);
- }
- else
- {
- printf(" %d",j);
- }
- }
- c++;
- }
- i++;
- printf("\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement