結果
| 問題 |
No.740 幻の木
|
| コンテスト | |
| ユーザー |
clocklr
|
| 提出日時 | 2018-10-05 22:31:42 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 835 bytes |
| コンパイル時間 | 1,097 ms |
| コンパイル使用メモリ | 107,884 KB |
| 実行使用メモリ | 26,068 KB |
| 最終ジャッジ日時 | 2024-10-12 13:17:38 |
| 合計ジャッジ時間 | 1,873 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 WA * 2 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using static System.Console;
using static System.Math;
public class Hello{
public static void Main(){
string[] input = ReadLine().Split(' ');
int[] x = new int[input.Length];
for(int i=0;i<input.Length;i++){
x[i] = int.Parse(input[i]);
}
int m2 = 1;
for(int i=0;i<x[1];i++){
m2 *= 2;
if(x[0] < m2){
break;
}
}
int month = 0;
while(x[0] > 0){
month++;
int tsuki = month % 12;
if(tsuki == 0){
tsuki = 12;
}
if(x[2] <= tsuki && tsuki <= x[2] + x[3] - 1){
x[0] -= m2;
}else{
x[0] -= x[1];
}
}
WriteLine(month);
}
}
clocklr