Submission #764492


Source Code Expand

#include <stdio.h>

int main(void)
{
	char s[20];
	int i=0,m1,m2;
	
	/*for(i<20;i++;){
		s[i]=getchar();
	}*/
	while( ( s[i++] = getchar() ) != '\n') ;
	 s[i-1] = '\0';
	 i=0;
	while(!(s[i]=='W' && s[i+1]=='W')) i++;
	m1 = i;
	//printf("m1 = %d\n",m1);
	if(s[m1+7]=='W'){
	if(m1==0) printf("Mi");
	else if(m1==2) printf("Re");
	else if(m1==4) printf("Do");
	else if(m1==5) printf("Si");
	else if(m1==7) printf("La");
	else if(m1==9) printf("So");
	else if(m1==11) printf("Fa");
	}
	else{
	if(m1==0) printf("Si");
	else if(m1==2) printf("La");
	else if(m1==4) printf("So");
	else if(m1==6) printf("Fa");
	else if(m1==7) printf("Mi");
	else if(m1==9) printf("Re");
	else if(m1==11) printf("Do");
	}
	//else{}
	//printf("%s",s);
	return 0;
}

Submission Info

Submission Time
Task C - ピアニスト高橋君
User RegFo
Language C (GCC 5.4.1)
Score 100
Code Size 775 Byte
Status AC
Exec Time 2 ms
Memory 128 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 1
AC × 8
Set Name Test Cases
Sample example_0.txt
All example_0.txt, handmade_0.txt, handmade_1.txt, handmade_2.txt, handmade_3.txt, handmade_4.txt, handmade_5.txt, handmade_6.txt
Case Name Status Exec Time Memory
example_0.txt AC 2 ms 128 KiB
handmade_0.txt AC 2 ms 128 KiB
handmade_1.txt AC 2 ms 128 KiB
handmade_2.txt AC 2 ms 128 KiB
handmade_3.txt AC 2 ms 128 KiB
handmade_4.txt AC 2 ms 128 KiB
handmade_5.txt AC 2 ms 128 KiB
handmade_6.txt AC 2 ms 128 KiB