結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
abc
|
| 提出日時 | 2016-10-23 11:21:39 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 250 ms / 5,000 ms |
| コード長 | 739 bytes |
| コンパイル時間 | 4,114 ms |
| コンパイル使用メモリ | 76,084 KB |
| 実行使用メモリ | 45,588 KB |
| 最終ジャッジ日時 | 2024-11-24 01:54:23 |
| 合計ジャッジ時間 | 5,073 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int numSections = sc.nextInt();
int numTypedTotal = 0;
int numNotTypedTotal = 0;
for (int i = 0; i < numSections; i++) {
int timeRestriction = sc.nextInt();
int possibleNumTyping = 12 * timeRestriction / 1000;
String s = sc.next();
int numLetters = s.length();
int numTyped = Math.min(numLetters, possibleNumTyping);
numTypedTotal += numTyped;
numNotTypedTotal += numLetters - numTyped;
}
System.out.println(numTypedTotal + " " + numNotTypedTotal);
}
}
abc