結果
問題 |
No.499 7進数変換
|
ユーザー |
![]() |
提出日時 | 2019-10-03 12:47:52 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 625 bytes |
コンパイル時間 | 700 ms |
コンパイル使用メモリ | 108,320 KB |
実行使用メモリ | 25,456 KB |
最終ジャッジ日時 | 2024-10-03 06:09:35 |
合計ジャッジ時間 | 2,310 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 WA * 3 |
コンパイルメッセージ
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; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int answer = 0; int a = 1; while(true) { answer += (N % 7) * a; if(N % 7 == 0 && N / 7 == 0) { break; } N = N / 7; a *= 10; } Console.WriteLine(answer); } } }