Submission #105208


Source Code Expand

Copy
#include<stdio.h>

int main(){
	int i,n,ex_hot,hot,summer,sultry,winter,cold;
	double min,max;
	i=ex_hot=hot=summer=sultry=winter=cold=0;
	scanf("%d",&n);
	while(1){
		if(i==n){
			break;
		}
		scanf("%lf %lf",&max,&min);
		if(max>=35.0){
			ex_hot++;
			if(min>=25.0)
				sultry++;
		}	
		else if((max>=30.0)&&(max<35.0)){
			hot++;
			if(min>=25.0)
				sultry++;
		}
		else if((max>=25.0)&&(max<30.0)){
			summer++;
			if(min>=25.0)
				sultry++;
			else if((min<0)&&(max>=0))
				winter++;
			else if(max<0)
				cold++;
		}
		else if(min>=25.0)
			sultry++;
		else if((min<0)&&(max>=0))
			winter++;
		else if(max<0)
			cold++;
		i++;
	}
	printf("%d %d %d %d %d %d\n",ex_hot,hot,summer,sultry,winter,cold);
	return 0;
}

Submission Info

Submission Time
Task B - 真冬日?真夏日?
User yukkuribemani
Language C (GCC 4.6.4)
Score 0
Code Size 763 Byte
Status
Exec Time 28 ms
Memory 1020 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:7:7: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
./Main.c:12:8: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]

Test Cases

Set Name Score / Max Score Test Cases
All 0 / 100 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt
Case Name Status Exec Time Memory
00_sample_01.txt 24 ms 880 KB
00_sample_02.txt 24 ms 824 KB
00_sample_03.txt 24 ms 932 KB
test_00.txt 24 ms 832 KB
test_01.txt 24 ms 916 KB
test_02.txt 24 ms 924 KB
test_03.txt 22 ms 820 KB
test_04.txt 23 ms 892 KB
test_05.txt 24 ms 832 KB
test_06.txt 28 ms 892 KB
test_07.txt 24 ms 876 KB
test_08.txt 25 ms 896 KB
test_09.txt 26 ms 932 KB
test_10.txt 26 ms 828 KB
test_11.txt 26 ms 860 KB
test_12.txt 25 ms 944 KB
test_13.txt 25 ms 1020 KB