結果
| 問題 | 
                            No.231 めぐるはめぐる (1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             bigbear90560
                         | 
                    
| 提出日時 | 2015-07-22 21:47:10 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,402 bytes | 
| コンパイル時間 | 4,255 ms | 
| コンパイル使用メモリ | 77,888 KB | 
| 実行使用メモリ | 56,764 KB | 
| 最終ジャッジ日時 | 2024-07-08 11:57:07 | 
| 合計ジャッジ時間 | 7,492 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 1 | 
| other | WA * 11 | 
ソースコード
import java.util.Scanner;
/**
 * No.231 めぐるはめぐる (1)
 */
public class AroundAndAround {
	public static void main(String[] args) {
		final int DEATH_PENA = 30000;
		final int FINISH_EXP = DEATH_PENA * 100;
		final int MAX_PLAY_TIME = 6;
		final String SEP = System.lineSeparator();
		
		StringBuilder sb = new StringBuilder();
		
		// 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();	// ダンジョン数
        int[] b = new int[a];	// 1時間あたりの経験値
        int[] c = new int[a];	// 1時間あたりの死亡数
        int[] d = new int[a];	// 1時間あたりの死亡数
    	int exp = 0;
    	int sum_exp = 0;
    	
        for (int i=0;i<a;i++) {
        	b[i] = sc.nextInt();
        	c[i] = sc.nextInt();
        	// 11時間あたりの取得経験値
        	exp = b[i] - DEATH_PENA * c[i];
        	d[i] = exp;
        	sum_exp += b[i] - DEATH_PENA * c[i];
        }
        // 合計値がレベルアップまで
        if (FINISH_EXP > sum_exp) {
        	sb.append("NO");
        } else {
        	sb.append("YES").append(SEP);
        	for (int i=0; i<MAX_PLAY_TIME/d.length;i++) {
        		for (int j=0; j<d.length; j++) {
        			sb.append(j+1).append(SEP);
        		}
        	}
        }
        System.out.println(sb.toString());
	}
}
            
            
            
        
            
bigbear90560