結果
問題 | No.740 幻の木 |
ユーザー | Kakisuke1005 |
提出日時 | 2018-12-17 19:22:58 |
言語 | C (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 303 bytes |
コンパイル時間 | 127 ms |
コンパイル使用メモリ | 29,236 KB |
実行使用メモリ | 4,348 KB |
最終ジャッジ日時 | 2023-10-25 23:30:17 |
合計ジャッジ時間 | 715 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 1 ms
4,348 KB |
testcase_02 | WA | - |
testcase_03 | AC | 1 ms
4,348 KB |
testcase_04 | WA | - |
testcase_05 | AC | 1 ms
4,348 KB |
testcase_06 | WA | - |
testcase_07 | AC | 1 ms
4,348 KB |
testcase_08 | AC | 1 ms
4,348 KB |
ソースコード
#include<stdio.h> int main() { int N,M,P,Q,i,num; num=0; i=1; scanf("%d %d %d %d",&N,&M,&P,&Q); do{ if((i>=Q)&&(i<=(P+Q-1))){ N-=(M*2); }else{ N-=M; } num++; i++; }while(N>0); printf("%d\n",num); return 0; }