結果
問題 | No.485 方程式のお勉強 |
ユーザー | TaK7907 |
提出日時 | 2017-10-25 01:14:28 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 59 ms / 2,000 ms |
コード長 | 1,205 bytes |
コンパイル時間 | 2,815 ms |
コンパイル使用メモリ | 107,732 KB |
実行使用メモリ | 25,688 KB |
最終ジャッジ日時 | 2023-08-13 23:45:45 |
合計ジャッジ時間 | 3,903 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 57 ms
23,640 KB |
testcase_01 | AC | 59 ms
21,812 KB |
testcase_02 | AC | 59 ms
21,732 KB |
testcase_03 | AC | 58 ms
21,556 KB |
testcase_04 | AC | 59 ms
23,812 KB |
testcase_05 | AC | 57 ms
23,632 KB |
testcase_06 | AC | 57 ms
23,592 KB |
testcase_07 | AC | 58 ms
21,672 KB |
testcase_08 | AC | 57 ms
21,480 KB |
testcase_09 | AC | 59 ms
21,672 KB |
testcase_10 | AC | 59 ms
21,676 KB |
testcase_11 | AC | 58 ms
21,664 KB |
testcase_12 | AC | 58 ms
23,552 KB |
testcase_13 | AC | 59 ms
21,688 KB |
testcase_14 | AC | 57 ms
19,624 KB |
testcase_15 | AC | 59 ms
23,704 KB |
testcase_16 | AC | 58 ms
25,688 KB |
コンパイルメッセージ
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; namespace yukicode { public class Program { public static string Solver(System.IO.TextReader reader) { var k = MyLib.GetIntList( reader.ReadLine(), ' ' ); int r; var q = Math.DivRem( k[ 1 ], k[ 0 ], out r ); return r == 0 ? q.ToString() : "NO"; } private static void Main() { Console.WriteLine( Solver( Console.In ) ); } } public class MyLib { public static string Ordinalization(int num) { string surfix = "stndrdth"; return string.Format( "{0}{1}", num, ( 0 < num % 10 && num % 10 <= 4 ) && ( ( num % 100 ) / 10 != 1 ) ? surfix.Substring( ( num % 10 - 1 ) * 2, 2 ) : surfix.Substring( 6 ) ); } public static List<int> GetIntList(string input, char delimitor) { return input.Split( delimitor ).ToList<string>().ConvertAll<int>( int.Parse ); } public static List<int> GetIntList(string input, char[] delimitors) { return input.Split( delimitors ).ToList<string>().ConvertAll<int>( int.Parse ); } } }