結果
| 問題 | No.544 Delete 7 | 
| コンテスト | |
| ユーザー |  くれちー | 
| 提出日時 | 2016-12-23 01:23:26 | 
| 言語 | C90 (gcc 12.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 278 bytes | 
| コンパイル時間 | 224 ms | 
| コンパイル使用メモリ | 21,760 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-12-23 20:34:20 | 
| 合計ジャッジ時間 | 8,413 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 4 | 
| other | WA * 48 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:14:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 |         scanf("%d", &n);
      |         ^~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#include <assert.h>
int contain7(int n) {
	while (n != 0) {
		if (n % 10 == 7 || n % 10 == -7) return 1;
		n = (n - n % 10) / 10;
	}
	return 0;
}
int main() {
	int n;
	scanf("%d", &n);
	assert(0 <= n);
	assert(n <= 1e9);
	assert(contain7(n));
	return 0;
}
            
            
            
        