結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
bal4u
|
| 提出日時 | 2019-04-07 21:24:40 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 660 bytes |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 30,208 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-27 21:47:26 |
| 合計ジャッジ時間 | 663 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
// yukicoder: No.35 タイパー高橋
// 2019.4.7 bal4u
// 初心者向け
#include <stdio.h>
#if 0
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif
int in() // 非負整数の入力
{
int n = 0, c = gc();
// while (isspace(c)) c = gc();
do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0');
return n;
}
int ins() // 文字列の長さだけを返す
{
int c, w = -1;
do c = gc(), w++;
while (c > ' ');
return w;
}
int main()
{
int N, t, s, a, b, w;
a = b = 0;
N = in(); while (N--) {
t = in(), s = ins();
w = 12 * t / 1000;
if (w >= s) a += s;
else a += w, b += s - w;
}
printf("%d %d\n", a, b);
return 0;
}
bal4u