Submission #54529743


Source Code Expand

Copy
const std = @import("std");
fn readChar() i32 {
const stdin = std.io.getStdIn().reader();
const c = stdin.readByte();
if (c) |value| {
return value;
} else |_| {
return -1;
}
}
fn readInt() i32 {
var value: i32 = 0;
while (true) {
const c = readChar();
if ('0' <= c and c <= '9') {
value = value * 10 + c - '0';
} else {
return value;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
const std = @import("std");

fn readChar() i32 {
    const stdin = std.io.getStdIn().reader();
    const c = stdin.readByte();
    if (c) |value| {
      return value;
    } else |_| {
      return -1;
    }
}

fn readInt() i32 {
    var value: i32 = 0;
    while (true) {
        const c = readChar();
        if ('0' <= c and c <= '9') {
            value = value * 10 + c - '0';
        } else {
            return value;
        }
    }
}

pub fn main() !void {
    const stdout = std.io.getStdOut().writer();
    const a = readInt();
    const b = readInt();
    const c = readInt();
    try stdout.print("{d} ", .{a + b + c});
    while (true) {
        const ch = readChar();
        try stdout.print("{c}", .{@truncate(u8, @bitCast(u32, ch))});
        if (ch == '\n') {
            break;
        }
    }
}

Submission Info

Submission Time
Task PracticeA - Welcome to AtCoder
User mikecat
Language Zig (Zig 0.10.1)
Score 100
Code Size 854 Byte
Status AC
Exec Time 0 ms
Memory 1624 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 7
Set Name Test Cases
All 00_rnd_01.txt, 00_rnd_02.txt, 00_rnd_03.txt, 00_rnd_04.txt, 00_rnd_05.txt, 00_sample_1.txt, 00_sample_2.txt
Case Name Status Exec Time Memory
00_rnd_01.txt AC 0 ms 1624 KB
00_rnd_02.txt AC 0 ms 1504 KB
00_rnd_03.txt AC 0 ms 1504 KB
00_rnd_04.txt AC 0 ms 1448 KB
00_rnd_05.txt AC 0 ms 1444 KB
00_sample_1.txt AC 0 ms 1504 KB
00_sample_2.txt AC 0 ms 1444 KB


2024-06-14 (Fri)
22:50:56 +09:00