Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve p111 in rust #43

Closed
wants to merge 3 commits into from
Closed

Solve p111 in rust #43

wants to merge 3 commits into from

Conversation

LivInTheLookingGlass
Copy link
Owner

No description provided.

rust/src/p0111.rs Fixed Show fixed Hide fixed
rust/src/p0111.rs Fixed Show fixed Hide fixed
Project Euler Problem 111

*/
use std::iter::zip;

Check warning

Code scanning / clippy

unused import: std::iter::zip Warning

unused import: std::iter::zip
rust/src/p0111.rs Fixed Show fixed Hide fixed
rust/src/p0111.rs Fixed Show fixed Hide fixed
rust/src/p0111.rs Fixed Show fixed Hide fixed
rust/src/p0111.rs Fixed Show fixed Hide fixed
rust/src/p0111.rs Fixed Show fixed Hide fixed
rust/src/p0111.rs Fixed Show fixed Hide fixed
rust/src/p0111.rs Fixed Show fixed Hide fixed
rust/src/p0111.rs Fixed Show fixed Hide fixed
rust/src/p0111.rs Fixed Show fixed Hide fixed
pub fn p0111() -> Answer {
let ten_9: u64 = 10_u64.pow(9);
let ten_10: u64 = 10_u64.pow(10);
let mut answer: u64 = 0;

Check warning

Code scanning / clippy

variable does not need to be mutable Warning

variable does not need to be mutable
pub fn p0111() -> Answer {
let ten_9: u64 = 10_u64.pow(9);
let ten_10: u64 = 10_u64.pow(10);
let mut answer: u64 = 0;

Check warning

Code scanning / clippy

variable does not need to be mutable Warning

variable does not need to be mutable
pub fn p0111() -> Answer {
let ten_9: u64 = 10_u64.pow(9);
let ten_10: u64 = 10_u64.pow(10);
let mut answer: u64 = 0;

Check warning

Code scanning / clippy

unused variable: answer Warning

unused variable: answer
pub fn p0111() -> Answer {
let ten_9: u64 = 10_u64.pow(9);
let ten_10: u64 = 10_u64.pow(10);
let mut answer: u64 = 0;

Check warning

Code scanning / clippy

unused variable: answer Warning

unused variable: answer
Comment on lines +21 to +26
if count > current[idx] {
current[idx] = count;
subanswer[idx] = p;
} else if count == current[idx] {
subanswer[idx] += p;
}

Check warning

Code scanning / clippy

if chain can be rewritten with match Warning

if chain can be rewritten with match
Comment on lines +21 to +26
if count > current[idx] {
current[idx] = count;
subanswer[idx] = p;
} else if count == current[idx] {
subanswer[idx] += p;
}

Check warning

Code scanning / clippy

if chain can be rewritten with match Warning

if chain can be rewritten with match
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant