結果
問題 |
No.35 タイパー高橋
|
ユーザー |
![]() |
提出日時 | 2015-04-07 21:24:07 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 225 ms / 5,000 ms |
コード長 | 725 bytes |
コンパイル時間 | 1,930 ms |
コンパイル使用メモリ | 77,104 KB |
実行使用メモリ | 44,908 KB |
最終ジャッジ日時 | 2024-07-04 10:56:01 |
合計ジャッジ時間 | 3,551 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner koko = new Scanner(System.in); int n = koko.nextInt(); int[] t = new int[n]; String[] s = new String[n]; int[] c = new int[n]; int can = 0; int cannot = 0; for(int i=0; i<n; i++){ t[i]=koko.nextInt(); s[i]=koko.next(); c[i]=(int)Math.floor(t[i]*12/1000); if(c[i]>=s[i].length()){ can=can+s[i].length(); }else{ can=can+c[i]; cannot=cannot+s[i].length()-c[i]; } } System.out.println(can+" "+cannot); } }