結果

問題 No.51 やる気の問題
ユーザー HaijinnHaijinn
提出日時 2017-07-27 19:52:33
言語 C90
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 204 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 21,248 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-18 08:55:55
合計ジャッジ時間 1,571 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
5,248 KB
testcase_01 AC 0 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 0 ms
5,376 KB
testcase_05 RE -
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 RE -
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 RE -
testcase_16 AC 1 ms
5,376 KB
testcase_17 AC 1 ms
5,376 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 1 ms
5,376 KB
testcase_22 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:18:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
   18 |         printf("%d\n",a);
      |                 ~^    ~
      |                  |    |
      |                  int  long int
      |                 %ld
main.c:10:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 | scanf("%ld%d",&a,&b);
      | ^~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include<string.h>


int main(){
long a;
int b;
int c;
int x=0;
scanf("%ld%d",&a,&b);
while(b-1!=0){
	c=a/(b*b);
	a-=c;
	b--;
	c=0;
	//printf("%d\n",a);
}
	printf("%d\n",a);
	return 0;
}
0