結果
問題 |
No.51 やる気の問題
|
ユーザー |
![]() |
提出日時 | 2016-11-19 15:32:47 |
言語 | C90 (gcc 12.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 220 bytes |
コンパイル時間 | 139 ms |
コンパイル使用メモリ | 22,272 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-26 21:51:21 |
合計ジャッジ時間 | 3,839 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 20 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:11:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d%d",&w,&d); | ^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <math.h> int main(void) { int d; int x; int q; int w; int i; int a; scanf("%d%d",&w,&d); for(i=0;i<d;i++){ a=x*x; q=w/a; x-=q; d--; if(i==d-1){ break; } } printf("%d",q); return 0; }