結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-25 20:01:42 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 328 ms / 5,000 ms |
| コード長 | 568 bytes |
| コンパイル時間 | 3,698 ms |
| コンパイル使用メモリ | 80,056 KB |
| 実行使用メモリ | 59,956 KB |
| 最終ジャッジ日時 | 2024-10-01 11:19:01 |
| 合計ジャッジ時間 | 5,338 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
import java.util.Scanner;
public class No00000035_Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int typeCnt= 0;
int nonTypeCnt = 0;
int n = Integer.parseInt(scan.nextLine());
for(int i = 0; i < n; i++) {
int cnt = (int) (12 * scan.nextDouble()) /1000;
int strLength = scan.nextLine().trim().length();
if(strLength <= cnt) {
typeCnt += strLength;
} else {
typeCnt += cnt;
nonTypeCnt += strLength - cnt;
}
}
System.out.println(typeCnt + " " + nonTypeCnt);
scan.close();
}
}