結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-31 16:33:27 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 5,000 ms |
| コード長 | 948 bytes |
| コンパイル時間 | 954 ms |
| コンパイル使用メモリ | 104,320 KB |
| 実行使用メモリ | 19,456 KB |
| 最終ジャッジ日時 | 2024-09-21 01:21:19 |
| 合計ジャッジ時間 | 1,772 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
namespace yukicoder
{
class Program
{
static void Main(string[] args)
{
int a = int.Parse(Console.ReadLine());
double b= 12;
b /= 1000;
double c = 0;
double[] d = new double[a];
double[] e = new double[a];
double ans = 0;
double ans1 = 0;
for (int i = 0; i < a; i++)
{
string[] s = Console.ReadLine().Split(' ');
c = double.Parse(s[0]);
c = Math.Floor(c * b);
if (c >s[1].Length)
{
c = s[1].Length;
}
d[i] = c;
e[i]=s[1].Length - c;
}
for(int j = 0; j < a; j++)
{
ans += d[j];
ans1 += e[j];
}
Console.WriteLine("{0} {1}", ans, ans1);
}
}
}