結果
問題 | No.35 タイパー高橋 |
ユーザー | YOSHI |
提出日時 | 2021-02-25 20:01:42 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 339 ms / 5,000 ms |
コード長 | 568 bytes |
コンパイル時間 | 3,945 ms |
コンパイル使用メモリ | 76,840 KB |
実行使用メモリ | 63,784 KB |
最終ジャッジ日時 | 2024-04-08 20:15:05 |
合計ジャッジ時間 | 5,823 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 325 ms
62,008 KB |
testcase_01 | AC | 316 ms
63,784 KB |
testcase_02 | AC | 334 ms
63,696 KB |
testcase_03 | AC | 339 ms
63,356 KB |
ソースコード
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(); } }