結果

問題 No.810 割った余りの個数
ユーザー giru_yukikogiru_yukiko
提出日時 2019-05-27 23:10:52
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 384 bytes
コンパイル時間 514 ms
コンパイル使用メモリ 29,360 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 18:20:05
合計ジャッジ時間 2,569 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
testcase_09 AC 1 ms
4,348 KB
testcase_10 AC 1 ms
4,348 KB
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 1 ms
4,348 KB
testcase_13 AC 1 ms
4,348 KB
testcase_14 AC 1 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 1 ms
4,348 KB
testcase_17 AC 1 ms
4,348 KB
testcase_18 AC 1 ms
4,348 KB
testcase_19 AC 1 ms
4,348 KB
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~

ソースコード

diff #

#include <stdio.h>

main(){
	int in[3],k;
	int cmp[100];
	int ans=0;
	char buf[100];
	int i=0;

	fgets(buf,sizeof(buf),stdin);
	sscanf(buf,"%d %d %d",&in[0],&in[1],&in[2]);

	while(in[0]<=in[1]){
		cmp[i]=in[0]%in[2];
		i++;
		in[0]++;
	}
	for(k=0;k<in[1];k++){
		i=0;
		while(i<in[1]){
			if(k==cmp[i]){
				ans++;	
				break;
			}
			i++;
		}
	}

	printf("%d\n",ans);
	return(0);
}
0