結果
問題 |
No.35 タイパー高橋
|
ユーザー |
![]() |
提出日時 | 2018-02-11 02:30:38 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 254 ms / 5,000 ms |
コード長 | 514 bytes |
コンパイル時間 | 2,594 ms |
コンパイル使用メモリ | 76,352 KB |
実行使用メモリ | 45,188 KB |
最終ジャッジ日時 | 2024-11-06 23:14:15 |
合計ジャッジ時間 | 4,426 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int n = sc.nextInt(); int type = 0; int miss = 0; for (int i=0; i<n; i++) { int t = sc.nextInt(); String s = sc.next(); int num = (12*t)/1000; if (num >= s.length()) { //完打 type += s.length(); } else if (num < s.length()) { //打ち逃し発生 type += num; miss += s.length() - num; } } System.out.println(type+" "+miss); } }