Submission #4046297
Source Code Expand
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Atcoder { class Atcoderrrrrr { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); string[] s = Console.ReadLine().Split(' '); int D = int.Parse(s[0]); int X = int.Parse(s[1]); int ans = 0; for(int i = 1; i <= N; i++) { int tmp = int.Parse(Console.ReadLine()); if(D%tmp !=0) { ans += (D / tmp) + 1; } else { ans += D / tmp; } } Console.WriteLine(ans + X); } } }
Submission Info
Submission Time | |
---|---|
Task | B - Chocolate |
User | Atria |
Language | C# (Mono 4.6.2.0) |
Score | 200 |
Code Size | 859 Byte |
Status | AC |
Exec Time | 22 ms |
Memory | 13140 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample-01.txt, sample-02.txt, sample-03.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, sample-01.txt, sample-02.txt, sample-03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 22 ms | 11220 KB |
02.txt | AC | 21 ms | 9044 KB |
03.txt | AC | 21 ms | 11092 KB |
04.txt | AC | 22 ms | 11092 KB |
05.txt | AC | 22 ms | 11092 KB |
06.txt | AC | 21 ms | 9044 KB |
07.txt | AC | 21 ms | 9044 KB |
08.txt | AC | 21 ms | 11092 KB |
09.txt | AC | 21 ms | 11092 KB |
sample-01.txt | AC | 22 ms | 13140 KB |
sample-02.txt | AC | 21 ms | 11092 KB |
sample-03.txt | AC | 21 ms | 9044 KB |