1 solutions

  • 0
    @ 2025-11-5 18:04:28

    C :

    #include<stdio.h>
    #include<string.h>
    #include<stdlib.h>
    int main()
    {
    	int i,t;
    	double x;
    	char a[9];
    	while(gets(a),strcmp(a,"END"))
    	{
    		x=atof(a);
    		t=0;
    		if(x==0||x==1)
    			printf("MEMBER\n");
    		else
    		{
    			i=13;
    			while(i--)
    			{
    				x=(x-(int)x)*3;
    				if((int)x==1)
    				{
    					printf("NON-MEMBER\n");
    					t++;
    					break;
    				}
    			}
    			if(t==0)
    				printf("MEMBER\n");
    		}
    	}
    	return 0;
    }
    
    • 1

    Information

    ID
    18758
    Time
    10000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By