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