結果
問題 | No.544 Delete 7 |
ユーザー | Risen |
提出日時 | 2017-07-14 22:42:12 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 23 ms / 1,000 ms |
コード長 | 421 bytes |
コンパイル時間 | 2,204 ms |
コンパイル使用メモリ | 108,056 KB |
実行使用メモリ | 27,860 KB |
最終ジャッジ日時 | 2024-11-21 16:09:03 |
合計ジャッジ時間 | 4,011 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 48 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;using System.Collections.Generic;using System.Linq;class Solution{static void Main(){var n = int.Parse(Console.ReadLine());var b = 0;for (int i = 1; i < n; i *= 10){var x = (n / i) % 10;if (x == 7){b -= i;}}var a = n - b;Console.WriteLine($"{a} {b}");}}