結果
| 問題 | No.51 やる気の問題 |
| コンテスト | |
| ユーザー |
TLwiegehtt
|
| 提出日時 | 2015-07-07 03:51:51 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 204 bytes |
| 記録 | |
| コンパイル時間 | 122 ms |
| コンパイル使用メモリ | 29,384 KB |
| 最終ジャッジ日時 | 2026-02-23 18:39:08 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 RE * 6 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d", &w);
| ^~~~~~~~~~~~~~~
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d", &d);
| ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void){
int d,w;
scanf("%d", &w);
scanf("%d", &d);
for(;d>0;d--){
int out = (int)w/(d*d);
if(d==1){
printf("%d\n", w);
break;
}
w -= out;
}
return 0;
}
TLwiegehtt