Submission #47206009
Source Code Expand
// -*- coding:utf-8-unix -*-
use proconio::input;
fn main() {
input! {
n: usize,
(d, x): (usize, usize),
a: [usize; n],
}
let count = a
.iter()
.map(|ai| {
let days = vec![0; d];
let all = days
.iter()
.enumerate()
.map(|(i, _)| if i == 0 || i % ai == 0 { 1 } else { 0 })
.sum::<usize>();
all
})
.sum::<usize>();
println!("{}", count + x);
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Chocolate |
| User | homura10059 |
| Language | Rust (rustc 1.70.0) |
| Score | 200 |
| Code Size | 546 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 2072 KiB |
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 | 1 ms | 1916 KiB |
| 02.txt | AC | 1 ms | 2072 KiB |
| 03.txt | AC | 0 ms | 1908 KiB |
| 04.txt | AC | 1 ms | 1856 KiB |
| 05.txt | AC | 1 ms | 1928 KiB |
| 06.txt | AC | 1 ms | 1924 KiB |
| 07.txt | AC | 0 ms | 1804 KiB |
| 08.txt | AC | 0 ms | 1908 KiB |
| 09.txt | AC | 1 ms | 2064 KiB |
| sample-01.txt | AC | 0 ms | 1792 KiB |
| sample-02.txt | AC | 1 ms | 1884 KiB |
| sample-03.txt | AC | 1 ms | 1908 KiB |