Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
14
Task/Babbage-problem/Zig/babbage-problem.zig
Normal file
14
Task/Babbage-problem/Zig/babbage-problem.zig
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn main() !void {
|
||||
var i: u64 = 0;
|
||||
var result: u64 = 99_736;
|
||||
while (i < 99_736) : (i += 1) {
|
||||
if (i * i % 1_000_000 == 269_696) {
|
||||
result = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
std.debug.print("The smallest number whose square ends in 269696 is {}\n", .{i});
|
||||
std.debug.print("The square is {}\n", .{i * i});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue