結果
| 問題 |
No.740 幻の木
|
| コンテスト | |
| ユーザー |
clocklr
|
| 提出日時 | 2018-10-05 21:38:23 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 959 bytes |
| コンパイル時間 | 1,054 ms |
| コンパイル使用メモリ | 110,752 KB |
| 実行使用メモリ | 25,996 KB |
| 最終ジャッジ日時 | 2024-10-12 12:56:47 |
| 合計ジャッジ時間 | 1,812 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(){
// int kazu = int.Parse(ReadLine());
string[] temp = ReadLine().Split(' ');
int a = int.Parse(temp[0]);
int b = int.Parse(temp[1]);
int p = int.Parse(temp[2]);
int q = int.Parse(temp[3]);
int m2 = 1;
for(int i=0;i<b;i++){
m2*=2;
if(m2>=a){
break;
}
}
int ans=0;
int tsuki =0;
while(a>0){
tsuki++;
int k = tsuki%12;
if(k==0){
k=12;
}
if(p <= k && k <= p+q-1){
a-=m2;
}else{
a-=b;
}
ans=tsuki;
if(a<=0){
break;
}
}
WriteLine(ans);
}
}
clocklr