Submission #11267808


Source Code Expand

Copy
void main() {
	auto X = ri;
	ulong res;
	while(X >= 500) {
		res += 1000;
		X -= 500;
	}
	res += (X / 5) * 5;
	res.writeln;
}

// ===================================

import std.stdio;
import std.string;
import std.functional;
import std.algorithm;
import std.range;
import std.traits;
import std.math;
import std.container;
import std.bigint;
import std.numeric;
import std.conv;
import std.typecons;
import std.uni;
import std.ascii;
import std.bitmanip;
import core.bitop;

T readAs(T)() if (isBasicType!T) {
	return readln.chomp.to!T;
}
T readAs(T)() if (isArray!T) {
	return readln.split.to!T;
}

T[][] readMatrix(T)(uint height, uint width) if (!isSomeChar!T) {
	auto res = new T[][](height, width);
	foreach(i; 0..height) {
		res[i] = readAs!(T[]);
	}
	return res;
}

T[][] readMatrix(T)(uint height, uint width) if (isSomeChar!T) {
	auto res = new T[][](height, width);
	foreach(i; 0..height) {
		auto s = rs;
		foreach(j; 0..width) res[i][j] = s[j].to!T;
	}
	return res;
}

int ri() {
	return readAs!int;
}

double rd() {
	return readAs!double;
}

string rs() {
	return readln.chomp;
}

Submission Info

Submission Time
Task B - Golden Coins
User private_yusuke
Language D (DMD64 v2.070.1)
Score 200
Code Size 1158 Byte
Status AC
Exec Time 2 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 14
Set Name Test Cases
Sample sample_01, sample_02, sample_03
All hand_01, hand_02, hand_03, hand_04, hand_05, random_01, random_02, random_03, random_04, random_05, random_06, sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
hand_01 AC 2 ms 256 KB
hand_02 AC 2 ms 256 KB
hand_03 AC 2 ms 256 KB
hand_04 AC 1 ms 256 KB
hand_05 AC 1 ms 256 KB
random_01 AC 1 ms 256 KB
random_02 AC 2 ms 256 KB
random_03 AC 2 ms 256 KB
random_04 AC 1 ms 256 KB
random_05 AC 1 ms 256 KB
random_06 AC 1 ms 256 KB
sample_01 AC 1 ms 256 KB
sample_02 AC 1 ms 256 KB
sample_03 AC 2 ms 256 KB