結果
| 問題 |
No.63 ポッキーゲーム
|
| コンテスト | |
| ユーザー |
umashika
|
| 提出日時 | 2016-02-25 23:32:58 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 289 bytes |
| コンパイル時間 | 431 ms |
| コンパイル使用メモリ | 20,224 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-22 13:47:51 |
| 合計ジャッジ時間 | 887 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 19 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d %d",&l,&k);
| ^~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main()
{
int l;
int k;
int memory = 0;
scanf("%d %d",&l,&k);
if(l-2*k>0){
while(l > 0){//lが正の限りループ
memory = k;
l = l-2*k;
k = k+k;
}
printf("%d\n",memory);
}
else{
printf("0\n");
}
return 0;
}
umashika