結果
問題 |
No.231 めぐるはめぐる (1)
|
ユーザー |
![]() |
提出日時 | 2016-09-03 17:06:04 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 194 ms / 1,000 ms |
コード長 | 466 bytes |
コンパイル時間 | 3,224 ms |
コンパイル使用メモリ | 74,964 KB |
実行使用メモリ | 43,452 KB |
最終ジャッジ日時 | 2024-11-15 19:03:18 |
合計ジャッジ時間 | 6,442 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
ソースコード
import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int req = 3000000, n = sc.nextInt(), max = 0, g, d; for(int i = 1; i <= n; i++){ g = sc.nextInt(); d = sc.nextInt(); if((g-30000*d)*6 >= req){ max = i; } } if(max == 0){ System.out.println("NO"); } else { System.out.println("YES"); for(int i = 0; i < 6; i++){ System.out.println(max); } } } }