結果

問題 No.189 SUPER HAPPY DAY
コンテスト
ユーザー prog470
提出日時 2015-04-22 00:32:06
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
TLE  
実行時間 -
コード長 280 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 129 ms
コンパイル使用メモリ 29,764 KB
最終ジャッジ日時 2026-02-23 18:17:44
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 TLE * 1 -- * 1
other -- * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%ld",&M);
      |         ^~~~~~~~~~~~~~~
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%ld",&D);
      |         ^~~~~~~~~~~~~~~

ソースコード

diff #
raw source code

#include <stdio.h>

int main(void) {
	long int M,D,x,y,c=0,i, j;
	
	scanf("%ld",&M);
	scanf("%ld",&D);
	
	for(j=1 ; j<=M ; j++)
	{
		for(i=1 ; i<=D ; i++ )
		{
			x = j/10 + j%10;
			y = i/10 + i%10;
			if(x == y)
			{
				c += 1;
			}
		}
		
	}
	
	printf("%ld\n",c);
	return 0;
}
0