Type: Default 1000ms 256MiB

数字方格

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

a1 a2 a3

如上图,有3个方格,每个方格里面都有一个整数a1,a2,a3。已知0a1,a2,a3n0 \le a1, a2, a3 \le n,而且a1 + a2是2的倍数,a2 + a3是3的倍数, a1 + a2 + a3是5的倍数。你的任务是找到一组a1,a2,a3,使得a1 + a2 + a3最大。

输入格式

一行,包含一个整数n (0n1000 \le n \le 100)。

输出格式

一个整数,即a1 + a2 + a3的最大值。

样例 #1

3
5
5
10

模拟

Not Claimed
Status
Done
Problem
8
Open Since
2024-6-24 0:00
Deadline
2024-7-31 23:59
Extension
24 hour(s)