Submission #110381


Source Code Expand

#include <iostream>
using namespace std;
int main()
{
	// 整数の入力
	int m, vv;
	vv = 0;
	cin >> m;
	// 100m 未満
	if( m < 100 )
		vv = 0;
	else if( m <= 5000 )
		vv = m / 100;
	else if( m < 30000 )
		vv = m / 1000 + 50;
	else if( m < 70000 )
		vv = (m / 1000 - 30) / 5 + 80;
	else
		vv = 89;
	char str[3];
	sprintf(str,"%02d",vv);

	// 出力
	cout << str << endl;
	return 0;
}

Submission Info

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

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:21:23: error: ‘sprintf’ was not declared in this scope