Submission #108524


Source Code Expand

Copy
#include <cstdio>

using namespace std;

int main(void){
	double m;
	scanf("%lf",&m);
	m /= 1000;
	if(0.1 > m){
		printf("00\n");
	}else if(5 >= m){
		printf("%02d\n",(int)(m * 10));
	}else if(30 >= m){
		printf("%d\n",50 + (int)m);
	}else if(70 >= m){
		printf("%d\n",(m - 30) / 5 + 80);
	}else{
		printf("89\n);
	}
	return 0;
}

Submission Info

Submission Time
Task B - 視程の通報
User afterCmidday
Language C++ (G++ 4.6.4)
Score 0
Code Size 349 Byte
Status

Compile Error

./Main.cpp:18:10: warning: missing terminating " character [enabled by default]
./Main.cpp:18:3: error: missing terminating " character
./Main.cpp: In function ‘int main()’:
./Main.cpp:16:34: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘double’ [-Wformat]
./Main.cpp:19:2: error: expected primary-expression before ‘}’ token
./Main.cpp:19:2: error: expected ‘;’ before ‘}’ token
./Main.cpp:7:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]