結果

問題 No.35 タイパー高橋
ユーザー te-shte-sh
提出日時 2017-01-11 15:34:04
言語 D
(dmd 2.106.1)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 320 bytes
コンパイル時間 682 ms
コンパイル使用メモリ 87,024 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-03 00:28:41
合計ジャッジ時間 1,103 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,380 KB
testcase_01 AC 3 ms
4,380 KB
testcase_02 AC 3 ms
4,384 KB
testcase_03 AC 3 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.algorithm, std.conv, std.range, std.stdio, std.string;

void main()
{
  auto n = readln.chomp.to!size_t;

  auto a = 0, b = 0;

  foreach (_; n.iota) {
    auto rd = readln.split, t = rd[0].to!int, s = rd[1].length;
    auto c = min(12 * t / 1000, s);
    a += c;
    b += s - c;
  }

  writeln(a, " ", b);
}
0