結果
問題 |
No.544 Delete 7
|
ユーザー |
![]() |
提出日時 | 2016-12-23 01:09:12 |
言語 | C90 (gcc 12.3.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 366 bytes |
コンパイル時間 | 136 ms |
コンパイル使用メモリ | 22,016 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-23 20:31:13 |
合計ジャッジ時間 | 9,612 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 47 TLE * 1 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:13:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%d", &n); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.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); int a = -1e9, b; while (1) { a++; b = n - a; if (!(-1e9 <= b && b <= 1e9)) continue; if (!contain7(a) && !contain7(b)) break; } printf("%d %d\n", a, b); return 0; }